"The explosion occurred at 08H25 (06H25 GMT)," a spokesman for the firefighters in Barcelona, which reported that a dead and 17 wounded.
The seven-storey building, according to the first images broadcast by local media, was evacuated as firefighters try to determine the source of the explosion, accidental or criminal.
Among the wounded only two are in serious condition, said the spokesman.