The guardsman killed a colleague and seized his ammunition before heading toward the synagogue, the Tunisian Interior Ministry said.
He opened fire at security units stationed near the synagogue, leaving two visitors and another security officer killed, before being killed during an exchange of fire. At least five security officers and other four civilians were injured and rushed to hospital for treatment.
"The synagogue and its possessions were cordoned off and all those inside and outside were secured," the Interior Ministry said, adding that an investigation was underway to determine the motive behind the "treacherous and cowardly" attack.
✡️�� — BREAKING NEWS: Gunfire erupts at Jewish synagogue in Djerba, Tunisia, during Lag Baomer festivities attended by about 1000 people, including Israelis.
Local media reported earlier that an exchange of fire near the Ghriba synagogue was heard, coinciding with the conclusion of the annual celebrations of hundreds of Jews from local communities and other countries.
Rene Trabelsi, a member of the organizing committee for the pilgrimage, assured that the majority of attendees had left the place before the assault. Those people who were still present were sheltered inside.
The Ghriba synagogue, one of the oldest synagogues in Africa, has fallen victim to terror attacks. In 2002, a suicide bombing at the synagogue killed 21 people and a soldier shot dead five people, including four Jews in 1985.
#Tunisia | Demonstrators took to the street to reject President Kais Saied's authoritarian actions, among which was the dismissal of Prime Minister Hichem Mechichi in July. pic.twitter.com/l87BSBkPuA