The Anti-Terrorism Public Prosecution in Paris has opened an investigation into the attack that took place in the vicinity of a synagogue on the island of Djerba in southeastern Tunisia two days ago, which killed three security men and two visitors, one of whom was French of Tunisian origin.

The prosecution said in a statement that it had opened "an investigation on charges of murder in connection with a terrorist group," and noted that it had "entrusted the investigations to the General Directorate of Internal Security."

On Wednesday, Tunisian authorities announced the death of a third security officer in the attack, which was carried out by a security officer with an individual weapon outside the synagogue before he was shot dead.

Tunisia's interior ministry said the man fired indiscriminately at security units who prevented him from reaching the temple and killed him. The operation also killed two visitors and wounded nine others, including four policemen, the Interior Ministry said.

Israel's Foreign Ministry said "one of the murdered Jews holds Israeli citizenship."

Former Tunisian Tourism Minister Rene Trabelsi said the dead were related to the family of Aviel Haddad, a 30-year-old Tunisian Jew, and Benjamin Haddad, 42, who lives in France and was in Djerba to take part in the visit.

Commenting on the attack, Tunisian President Kais Saied accused the perpetrators of seeking to sow seeds of discord and hit the tourism sector and the state.

"We will work to maintain security and stability within society," Saeed said. Such operations have been known to many countries and continue to suffer from them."

Ennahda also condemned what it described as the heinous crime that took place in the vicinity of the Ghriba synagogue in Djerba, calling for speeding up investigations to uncover the circumstances of this crime.

France's foreign ministry condemned the attack as horrific, saying it was reminiscent of a 2002 attack that killed 21 people and was carried out by the attacker via a truck carrying a gas tanker.

The annual visit season to the Ghriba Synagogue, Africa's oldest synagogue, attracts hundreds of Jews from Europe and Israel to the island of Djerba, a major tourist resort off the coast of southern Tunisia and 500 kilometers from the capital Tunis.