MADRID -- A powerful gas explosion tore through a residential building in central Madrid on Wednesday, killing at least three people and ripping the facade off the structure.

A tower of smoke rose from the building, where repairs were being done to a gas boiler, and billowed through Toledo Street, near the city's centre. Aerial footage shared by Spain's National Police showed rubble covering a nearby schoolyard -- though Madrid's mayor said no one was seriously injured at the school.

At least eight people were injured in the blast, one seriously, the Madrid emergency service said in a tweet. And a technician who was working on the boiler is missing, according to the Spanish government's representative for the Madrid region, Jose Manuel Franco, who confirmed the three dead.

A police spokesman on the ground told reporters that firefighters were trying to put out a small fire inside the damaged building before they could bring in search dogs and special rescue teams to look for any possible survivors.

An Associated Press reporter saw emergency workers carry two bodies away from the area, one that firefighters covered with a blue blanket and another shrouded in reflective emergency sheeting.

The building belongs to the nearby La Paloma Catholic Parish and hosted the offices and apartments for some of its priests, Madrid Archbishop Carlos Osoro told Spanish public broadcaster, TVE, who confirmed that none of the clerics were among the victims.

Emy Lee Grau, an area resident who was watching television in a building across the street, said that the moment of the blast was "terrifying."

"Everything shook, it felt like the roof was falling on us. We were terrified when we saw the amount of smoke coming out of the church's building," the 20-year-old Madrid resident told The Associated Press.

A nearby nursing home was evacuated and no injuries were initially reported among the residents, Madrid Mayor Jose Luis Martinez Almeida told reporters on the ground. The home's 55 residents were initially taken to a hotel across the street and were later sent to other care homes, officials said.

Martinez Almeida also said that some mild damage had been identified in a nearby school, where he said people suffered no more than "scratches."

Neighbourhood resident Leire Reparaz said she heard the explosion and wasn't immediately sure where it was coming 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 gray smoke," the 24-year-old said.

------

Associated Press photographer Paul White contributed to this report.