"So far, more than 20 of our colleagues in the fire brigade have lost their lives rescuing others," mayor Mohammad Bagher Ghalibaf told Iranian state television.
Fire brigade spokesman Jalal Maleki said he could not confirm the 20 deaths, and they were still being treated officially as missing since no bodies had yet been pulled from the rubble.
Rescue workers, soldiers and sniffer dogs were desperately hunting for survivors in the debris of the 15-storey Plasco building, which contained a shopping centre and hundreds of clothing suppliers.
Dramatic images showed flames pouring out of the top floors of the building, which collapsed shortly before midday after a four-hour blaze.
More From This Section
Around 200 firefighters had been tackling the blaze at the Plasco building, which dated from the 1960s.
"I was inside and suddenly I felt the building is shaking and is about to collapse. As we gathered colleagues and got out, a minute later the building collapsed," said Ali, a firefighter at the scene.
President Hassan Rouhani demanded an immediate investigation, calling the incident "unfortunate and sorrowful".
"More than 30 times we warned the building's owners that it was not safe, but unfortunately they did not pay attention," said municipality spokesman Shahram Gilabadi.
The fire brigade spokesman said the building was known to breach safety standards.
"Even in the stairwells, a lot of clothing is stored and this is against safety standards. The managers didn't pay attention to the warnings," Maleki told state television, adding that the building lacked sufficient fire extinguishers.
Dozens of Tehranis queued to donate blood.
The steel skeleton of the building was left twisted and bent down to the ground as around 100 fire engines and dozens of ambulances surrounded the area, from which smoke was still rising hours later.
The head of Tehran's tailors' union said there were around 400 clothing suppliers inside and many lacked insurance.
The Plasco building was Tehran's first shopping centre and Iran's tallest building when it was finished in 1962, before being dwarfed by the construction boom of later years.