Africa's oldest synagogue is playing host to that rarity in the Arab world - a religious gathering of hundreds of Jews drawn from Europe and Israel.

Guarded by armed Tunisian police, Jewish revellers chant and dance in a three-day pilgrimage to the Ghriba synagogue at an island resort 500 km south of Tunis.

In 2011, after the uprising that toppled former president Zine El Abidine Ben Ali, the annual celebration was cancelled and in 2012 only a few dozen Jews attended out of fear of possible attacks by hardline Islamists.

In 2002 militants linked to al-Qaida attacked the synagogue with a truck bomb killing 21 Western tourists. Security for this year's pilgrimage is tight, with hundreds of police on duty. "The strong presence of security is a positive step and sends a message to the Jews in the world that Tunisia protects us even if its leaders are Islamists", Perez Trabelsi, the head of the Jewish community in Djerba, told Reuters.

"Jews in the world will see the government's efforts to make the celebration safe and will return in their thousands over the next few years and will not pay attention to any threat," he added.

On Sunday Tunisia's tourism minister is due to take part in the celebrations, which have attracted dozens of Tunisian Muslims.

"We are here to send a message of peace and tolerance embracing everyone," said a Tunisian woman named Zahayra Lakhel, putting on a Jewish head scarf before she entered the synagogue. "We also want to change the image of Muslims who have been associated with violence and terror. The Jews have been our friends for years and we are here to remember old and beautiful memories away from religious and political tensions."

Mainly Muslim Tunisia is home to one of North Africa's largest Jewish communities. Though they now number less than 1,800 people, Jews have lived in Tunisia since Roman times. The Ghriba synagogue, home to most of Tunisia's Jews, is built on the site of a Jewish temple that is believed to date back almost 1,900 years.