Three people were killed, including a male and female suicide bomber, and 15 wounded in late Saturday's attack on a restaurant popular with foreigners in central Djibouti, local media say.
Quoting an interior ministry statement, Djibouti's ADI news agency said the attackers were from Somalia, where Djiboutian troops are part of an African Union force fighting al-Shabab rebels.
"According to the initial indications from the investigation, the three dead include two suicide bombers of Somali origin, a man and a veiled woman. Out of the wounded, four are in a serious condition," the agency quoted the interior ministry as saying.
The attack targeted La Chaumiere, a restaurant reported to have been packed with westerners.
The French foreign ministry confirmed that several of its nationals were slightly wounded in the attack, and the Netherlands' De Telegraaf reported that six Dutch soldiers who had been taking part in an anti-piracy mission were also slightly hurt.
There was no immediate claim of responsibility for the attack, although Djibouti's President Ismail Omar Guelleh was quoted as saying by ADI that the attack was a "violent reaction to our participation in the process to stabilise and secure the region".
The president also vowed to "do everything to find those who ordered this barbaric attack", and said "this act of blind terrorism will not change our determination to fight alongside the international community".
The Horn of Africa country of Djibouti, a former French colony, is home to the United States' biggest base in Africa which is used for anti-terror operations in Yemen, Somalia as well as for other operations across Africa.
France also maintains a military base in Djibouti.
Djibouti is also a key contributor of troops to the African Union force in Somalia, and the Shabab have already carried out attacks against Kenya and Uganda, who also have forces in Somalia.
Djibouti's port also serves as a key base for ships taking part in international anti-piracy operations off the Somali coast.
The operation to protect international shipping lanes in the Gulf of Aden has led to a sharp drop in piracy in recent years.