Defence minister Etienne Massard said: "According to the first testimonies at the scene, the assailant, a 53-year-old Nigerien man, shouted 'Allahu Akbar' ("God is Greatest") during the attack.

"He was arrested on the spot."

Mr Massard said the man has lived in Gabon for 19 years, adding: "In his first statements [he] said he acted in retaliation for US attacks against Muslims and America's recognition of Jerusalem as Israel's capital."

The two victims were sent to a hospital in the capital Libreville, one in a serious condition.