Al-Qaeda in Islamic North Africa had called for a holy war to avenge the August 6 overthrow by the military of Sidi Ould Cheikh Abdallahi, Mauritania's first freely elected president.
Since the 2005 attack, the Group for Call and Combat has represented itself as a branch of Osama bin Laden's al-Qaeda network operating in northern Africa.
The United States had sent dozens of troops to train Mauritania's military in the far northern deserts, hoping the country could act as a bulwark against the southward encroachment of al-Qaeda-linked operatives in North Africa.
But the US suspended those programmes along with more than $20m in aid after the August coup.
In December 2007, armed men believed to be linked to al-Qaeda murdered four French tourists, prompting organisers of the famous Dakar Rally to cancel the race this year.
Mauritanian authorities also suspect Islamist "terrorists" were responsible for an attack on the Israeli embassy in Nouakchott, which killed three soldiers near the town of Ghallawiya, around 700km north of the capital.