The injured include six security agents and four civilians, the ministry said.
The assailant, a guard affiliated with the National Guard naval center in the town of Aghir on Djerba, first killed a colleague with his service weapon and then seized ammunition and headed toward the Ghriba synagogue, the ministry said.
When he reached the site, he opened fire on security units stationed at the temple. The synagogue was locked down and those inside were kept secure while authorities investigate the motives for the attack, the ministry said.
It occurred during an annual pilgrimage that attracts thousands of visitors from around the world to one of Africa’s oldest synagogues. Djerba is home to Tunisia’s main Jewish community.
In 2002, a truck bombing killed some 20 people at the entrance to the temple during the annual Jewish pilgrimage. Al-Qaida claimed responsibility for that attack, whose victims included German and French tourists as well as Tunisians.
Ghayda Thabet, a member of the Tunisian Association for the Support of Minorities, was at the Ghriba synagogue and appealed for help on Facebook. “They are shooting with live ammunition. Help us,” she pleaded in a post.
Videos circulating online showed panic-stricken visitors running while gunshots rang out.
Former Tourism Minister Rene Trabelsi, a native of Djerba, said this year’s pilgrimage had far been festive and “successful” including several political figures and foreign diplomats who participated.