The police say the suspects in Mauritania tourist murders have links to al-Qaeda.
At least one man opened fire on the embassy early on Friday, starting a battle with guards that wounded three French citizens, who had apparently been visiting a disco and restaurant adjacent to the embassy compound.
Guards at the embassy returned fire, but no embassy staff were wounded.
Some witnesses said the attackers, who numbered at least three, shouted “Allahu Akbar” (God is Greatest) as they exchanged fire with guards at the fortified embassy.
The Israeli blockade of the Gaza Strip, which has seen deliveries of fuel and other supplies halted in recent weeks, has prompted protests in Mauritania, an overwhelmingly Muslim nation.
Al-Qaeda in the Islamic Maghreb, formerly known as the Salafist Group for Call and Combat, is based in Algeria and has claimed responsibility for near-simultaneous bombings at UN offices in Algiers and a government building on December 11 that killed at least 37 people.
The same group also purportedly said in an audiotape that it carried out the killing of several soldiers in Mauritania in December.
Mauritania has had relatively few incidents of terrorism in recent years, but on Christmas Eve, four French tourists were shot dead as they picnicked at the side of a road.
The government blamed the attack on a group affiliated with al-Qaeda.
The killings led the French organisers of the famous Paris-Dakar Rally to cancel the long-standing trans-Saharan race, which would have visited the nation last month.