Updated

Firefighters struggled for nearly 24 hours before finally controlling Madrid's worst blaze in recent memory, which reduced one of the city's tallest office buildings to a blackened hulk of twisted wreckage.

Thick smoke and temperatures that soared as high as 1,472 degrees Fahrenheit prevented firefighters from entering the 32-story Windsor building (search) until late Sunday. The fire, which left seven people slightly injured, broke out Saturday just before midnight.

The office tower was heavily damaged but did not collapse, as had been feared. However, officials said it was unstable and closed the area around the building.

"What worries us now is its structural state because of the high temperatures it was subjected to," said Merardo Tudelo, director of the Madrid Municipal Firefighters (search).

Mayor Alberto Ruiz-Gallardon said "the situation is still critical."

Emergency officials planned to keep the area in the Spanish capital's banking and business district cordoned off at least through Monday.

Gallardon ordered nearby businesses to remain closed for the next few days. Service on three subway lines running under or near the building would also be curtailed, he said.

"This is the biggest fire ... this city has ever had," Gallardon said.

It was not immediately clear what caused the fire, but the building was almost empty on Saturday night when the first alarm went off. Only one of seven firefighters who suffered smoke inhalation remained hospitalized Sunday, Gallardon said.

Construction of the shiny gold Windsor Building began in 1973 and was completed in 1979. It became a landmark in Madrid's business district. The building was surrounded with scaffolding due to recent repairs, and a huge crane remained perched on its roof.