The statement from Al-Qaeda in the Islamic Maghreb does not elaborate, but suggests that Spain paid a ransom. The Spanish government has declined comment on a report that money was paid.

Spanish newspaper El Pais said Tuesday it received the statement in an audio clip.

The clip said the release of the two Spaniards should be a lesson to France — which mounted a failed military attempt last month to free a French hostage held by the group.

Al-Qaeda in the Islamic Maghreb executed the hostage in retaliation.