Tehran's mayor said more than 20 firefighters were killed when the city's oldest high-rise collapsed.
"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.
Some 78 people -- mostly firefighters -- were injured as they rushed to evacuate the building, the head of Tehran's emergency services told state television, and six were still in hospital by late evening.
Dramatic images showed flames pouring out of the top floors of the building, which collapsed shortly before midday after a four-hour blaze.
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.
Local media said the workshops were especially full of clothes in the build-up to Nowruz, the Iranian New Year which falls in March.
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.
The tragedy brought condolences from around the world, with the London Fire Brigade tweeting: "Our thoughts are with the friends and families of the firefighters who have died following the fire and building collapse in Tehran."
Dozens of Tehranis queued to donate blood, with one young man telling state television: "This is the least we could do for those who take their lives into their hands to rescue others."
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.
"I've lost my entire stock. Thousands of families have been ruined," said Ahmad, the owner of one of hundreds of shops and business units in the building.
The head of Tehran's tailors' union said there were around 400 clothing suppliers inside and many lacked insurance.
"They were preparing clothing for the New Year and that's why all supply units were full of clothes.
"Unfortunately the majority of these suppliers did not have fire insurance and have therefore suffered irreparable damage," he said.
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.
It was built by Habibollah Elghanian, a prominent Iranian-Jewish businessman who was arrested for ties to Israel and sentenced to death and executed after the 1979 Islamic revolution.
The fire is thought to have begun on the ninth floor and spread quickly to workshops above.