Three hours after the explosion occurred, smoke and flames could still be seen emerging from the building as a police helicopter flew overhead, an AFP correspondent said.
At least two people were killed and several others injured when a strong explosion on Wednesday rocked a building located in the Spanish capital, witnesses and worldwide media said, with images from local television and the emergency services showing the street covered in debris.
A reporter for TVE said several had been injured, without giving details.
Speaking at the scene, Mayor Jose Luis Martinez-Almeida said an 85-year-old woman had died along with a man whose age was not immediately clear, while the third victim was still "under the rubble".
Emergency services have cordoned off the area and television images showed several people being treated for injuries.
A loud explosion of unknown origin has partially destroyed a six-floor-tall building flanked by a school and a nursing home in the center of Spain's capital, Madrid. A witness told Telemadrid broadcaster that there was at least one person trapped inside.
The cause has not yet been revealed although initial reports said it could be a gas explosion.
According to TVE, the school was empty because classes had not resumed yet following a record snowfall in the Spanish capital on January 9.
No one was injured in a residence for the elderly nearby and all residents have been evacuated, the mayor said.
Leire Reparaz, an area resident, told The Associated Press that she heard a loud explosion some minutes before 3 p.m. local when she was heading to her home near the Puerta de Toledo, a local landmark.
Electrician David Santos Muñoz, a 35-year-old father of four, was identified as one of the dead, Madrid's Archdiocese said in a tweet, saying he had gone to the parish-owned building earlier in the day to lend a hand.
"We didn't know where the sound came from", she said. We all thought it was from the school.