A bomb has exploded inside the cathedral of the Spanish city of Zaragoza while worshippers were inside but no one was hurt.

The regional government said the explosion happened at about 1.50pm local time inside the Basilica of Our Lady of the Pillar and that people inside were evacuated over concerns that there might be more devices.

A spokesman said no one was hurt and no group has taken responsibility.

Pope John Paul visited the cathedral in 1984.