A loud explosion apparently caused by a gas leak has partially destroyed a residential building in the centre of Spain's capital, killing two people and injuring at least two more, according to officials.
The first images and footage shared on social media showed a tower of smoke coming out from the six-storey building and rubble scattered in Toledo Street, near the city centre.
Emergency crews could be seen aiding several people on the ground.
Mayor Jose Luis Martinez Almeida confirmed the two deaths to the Telemadrid news channel and said that the initial assessment was that the blast was caused by a gas leak.
A nearby nursing home was evacuated although no injuries were initially reported among the residents, Mr Martinez Almeida said. He said the residents were being taken to a hotel across the street.
Mr Martinez Almeida also said that some mild damage had been identified in a nearby school.
Spain's public broadcaster, TVE, said the school was thought to have been empty because classes had not resumed yet following a record snowfall in Madrid on January 9.
In a tweet, the Madrid regional emergency service said that rescue teams, firefighters and police were working in a central area of the Spanish capital following the explosion.
Leire Reparaz, an area resident, told The Associated Press that she heard a loud explosion some minutes before 3pm local time when she was heading to her home near the Puerta de Toledo, a local landmark.
"We didn't know where the sound came from. We all thought it was from the school. We went up the stairs to the top of our building and we could see the structure of the building and lots of grey smoke," the 24-year-old Madrid resident said.