A historic high-rise building in the heart of Iran’s capital caught fire and later collapsed Thursday, killing at least 30 firefighters and leaving their stunned colleagues and bystanders weeping in the streets.

The disaster at the 17-story Plasco building, inadvertently shown live on state television, came after authorities said they repeatedly warned tenants about blocking stairwells with fabric from cramped garment workshops on its upper floors.

Firefighters, soldiers and other emergency responders dug through the debris into the night, looking for survivors. While it was not clear how many people were in the steel-and-concrete building, witnesses said many had slipped through a police cordon while the fire burned to go back inside for their belongings.

“They asked us … using loudspeakers to evacuate the building, but some people went inside again, saying their precious documents, their bank checks, their entire life was in their shops,” said witness Masoud Hosseini. “They went inside to fetch those documents. I felt like they cared about their belongings, checks and money more than their lives.

Tasnim News Agency/Handout via Reuters

Firefighters react at the site of a collapsed high-rise building in Tehran, Iran Jan. 19, 2017.

“Firefighters went inside to bring them out, and then suddenly the building collapsed,” Hosseini said.

Iranian authorities did not immediately release definitive casualty figures, which is common in unfolding disasters.

Iran’s state-run Press TV announced the firefighters’ deaths, without giving a source for the information. Mayor Mohammad Bagher Ghalibaf said more than 20 bodies of firefighters had been recovered by Thursday night.

Local state television said 30 civilians were injured, while the state-run IRNA news agency said 45 firefighters had been injured.

Firefighters began battling the blaze around 8 a.m., some 3 1/2 hours before the collapse. The fire appeared to be the most intense on the upper floors, the site of workshops where tailors cooked for themselves and used old kerosene heaters for warmth.

Vahid Salemi/AP Photo

Iranian firefighters work to extinguish fire of the Plasco building in central Tehran, Iran, Jan. 19, 2017.

The building came down in seconds, shown live on state television , which had begun an interview with a journalist at the scene. One side collapsed first, tumbling perilously close to a firefighter perched on a ladder and spraying water on the blaze.

A thick plume of brown smoke rose over the site afterward, and onlookers wailed in grief.

“God willing, nothing happened to firefighters who were there,” the journalist said, then began crying.

Watching the disaster unfold was Masoumeh Kazemi, who said she rushed to the building because her two sons and a brother worked in the garment workshops on the upper floors.

“My nephew was working in a workshop there,” he said. “He has been living with me since moving to Tehran last year from the north of the country in hopes of finding a job.”

Iran’s Supreme Leader Ayatollah Ali Khamenei expressed sorrow over the fire in a statement and praised the courage and sacrifice of the firefighters.

President Hassan Rouhani ordered Interior Minister Abdolreza Rahmani Fazli to investigate the disaster, IRNA reported. Rouhani also ordered the ministry to ensure the injured were cared for and immediately compensate those affected by the disaster. Rouhani, whose administration struck the nuclear deal with world powers, will probably be standing for re-election in May.

The cause of the blaze wasn’t immediately known. However, fire department spokesman Jalal Maleki said authorities had visited the building often to warn tenants about conditions there.

“Everyone stacked up goods outside their shops and in the staircases and corridors,” Maleki said. “We warned them many times, but they wouldn’t listen.”

In the hours after the collapse, authorities also described the building as having a “weak structure,” without elaborating.

Another fire broke out later Thursday at a building next to the collapsed tower, according to the semi-official Fars news agency. Firefighters worked into the night to extinguish it.

The Plasco building was an iconic presence on Tehran’s skyline, one of the first to rise against the backdrop of the snowcapped Mount Damavand. Opened in 1962, it was the first privately owned tower to be built during the era of the U.S.-backed shah, when oil money fueled the capital’s rapid development.

The tower, the tallest in Tehran at the time and just north of the sprawling Grand Bazaar, got its name from the plastics manufacturing company owned by its builder, Iranian Jewish businessman Habib Elghanian.

After the 1979 Islamic Revolution that overthrew the shah, Iran’s new clerical rulers had Elghanian tried on charges that included spying for Israel. He was executed by firing squad — an outcome that prompted many of the remaining members of the country’s longstanding Jewish community to flee.

The state-controlled Islamic Revolution Mostazafan Foundation took ownership of the building. The foundation, which has ties to the powerful paramilitary Revolutionary Guard, made no immediate statement about the collapse.

The fire was the worst in Tehran since a 2005 blaze at a historic mosque killed 59 worshippers and injured nearly 200 others.

Thursday’s disaster stunned the city. Firefighters openly wept on the streets, holding each other for support. Dozens of people lined up to donate blood.

“It is a humanitarian duty,” said Gholamreza Heidari, a university student. “It is nothing compared to the dedication that our firefighters showed in rescuing people.”