"This criminal attack has killed seven Spanish tourists and two Yemeni nationals who worked as drivers and tourist guides, and wounded six Spanish tourists and two [Yemeni] nationals."
An official at Spain's foreign ministry in Madrid confirmed the tourists were Spanish nationals.
Witnesses said the attack occurred as the tourists were ending their tour of the temple.
A security official at the Yemen defence ministry said a car filled with explosives hit the tourists' five-car convoy, which included a police car.
No organisation has yet claimed responsibility for the bombing.
Security sources said the attack came after al-Qaeda issued a statement demanding the release of fighters from Yemeni jails.
The sources also said al-Qaeda's statement said Sanaa should distance itself from the US.