Initial examination revealed that the explosion is due to a gas leak.

Explosion in Madrid Destroys Building, Kills 2
Explosion in Madrid Destroys Building, Kills 2. Leire Ariz Sarasketa/Twitter