One does not have to look far and wide to find a rich Jewish legacy in Morocco. From Casablanca and Essaouira on the Atlantic coastline to inland Fez and Marrakesh, surrounded by mountains, the Jewish presence in the mostly Muslim country dates back centuries.

Despite the fact many community members have emigrated elsewhere, their synagogues and cemeteries have not only been carefully preserved, they have received support, financial and otherwise, from the highest echelons of government, including ruling leader King Mohammed VI.

With estimates ranging from 2,000 to 5,000 Jews in Morocco today (down from a high of approximately 248,000 in 1948), the majority of them concentrated in Casablanca, the country’s hub of commerce, their future may be uncertain. The declining figures, though, don’t stop Jewish visitors, many of them Moroccan expats, from visiting.

A graveside shrine to Solica Hatchouel, a Jewish girl murdered in the 18th century for refusing to convert to Islam

As part of a group of Jewish journalists who visited the kingdom last month on a trip sponsored by the Moroccan National Office of Tourism, I felt both welcome and comfortable as a Jew there and numerous times ran into groups of Israelis openly speaking Hebrew.

“All the Moroccans, they have this Jewish memory…”

An excellent way to get a comprehensive overview of Moroccan Jewry is by visiting the Museum of Moroccan Judaism in Casablanca.

The museum, which opened in 1997 and is overseen by the Moroccan Foundation of Jewish Cultural Heritage, is the only Jewish museum in the Arab world. Launched to tell the story of the country’s 2,000-year-old Jewish history, the building, a Jewish orphanage built in 1948, now houses ritual objects, historic documents, costumes and a bima (c. 1944) from the Beni-Issakhar Synagogue in Casablanca.

Interior of Synagogue Aben Danan in Fez

Curator Zhor Rehihil told our group there are 2,000 Jews in Casablanca and 10 active synagogues, including the beautiful and central downtown synagogue, Beth El, which hosted a memorial to the foundation’s president, Jacques Toledano — whose shiva was just concluding — our first night there. She said there are four Jewish schools in Casablanca — the only city with Jewish day schools — and three of them have more Muslim students than Jews.

“All the Moroccans, they have this Jewish memory,” said Rehihil, who is herself Muslim, explaining that after the Jews left the country, “we lost a lot of … our identity, our culture.”

Each major city we visited had a medina, or walled city, and the mellah, the Jewish quarter within the medina. We heard many interpretations for the reason these quarters were named after the Arabic word for “salt” (in Hebrew, salt is “melach”). The most basic explanation is that Jews in ancient times used Moroccan salt to barter for gold. Another was that Jews used salt on the heads of rebels to preserve them, and still another intriguing one was that the term “salty” was a compliment to Moroccan women. In any event, a telltale sign of the Jewish presence were homes with actual balconies and windows looking out onto the street; Muslim homes were closed in so women would not be exposed and could leave their heads uncovered while inside.

After visiting the capital of Rabat and the community of Meknes, we visited Fez, a UNESCO world heritage site founded in 789; estimates of the Jewish population there range from 100 to 250-300 families, although that may include the city’s environs. We were unable to enter the locked 17th-century Slat Al Fassiyine synagogue, which was restored and inaugurated in 2013 with funding from the Moroccan Foundation of Jewish Cultural Heritage and the German government.

Beth El Synagogue in Casablanca.

But inside the medina, we were treated to a tour of the beautifully restored Rabbi Shlomo Aben Danan Synagogue, founded by the Danan family in the 17th century. The synagogue was renovated in 1996 by the World Monuments Fund in partnership with Morocco’s Ministry of Culture, the Fez Jewish community and the Judeo-Moroccan Cultural Heritage Foundation, according to the WMF, and reopened to the public in 1999 with additional assistance from Danan family members.

Its Muslim caretaker showed our group the Torah scrolls, an old mikvah and the women’s balcony, and even took us to the rooftop, with its sweeping view of the restored Jewish cemetery, Beit HaChaim, Cimetière Israelite de Fès, which was renovated with the support of the king.

A Jewish star over a doorway in Essaouira’s Jewish quarter.

Like all cemeteries worldwide, maintenance issues are ongoing, and a stand near the entrance asks for tzedakah, stating in Hebrew, French and English: “[Giving] charity preserves [one] from death.” The white-stoned monuments include the final resting places of leading Moroccan rabbis; ordinary community members; and the tomb of one famous young heroine, “Mademoiselle” Solica Hatchouel, who was born in Tangiers in 1817, refused to convert to Islam, and was assassinated in 1834 for her defiance.

From Fez, we journeyed to Marrakesh in time for Shabbat, attending Friday night services at Synagogue Beth-El, located in a modern downtown neighborhood. While the exterior is nondescript, the interior resembles the style of a traditional Sephardic synagogue, richly adorned with an ornate wooden ark and lanterns adorned with chamsas dangling from the ceiling. Both men and women chant the prayers with great feeling; be sure to attend on Friday night, when Moroccans traditionally recite the Song of Songs, a biblical book comparing God and the Jewish people to a sensuous love story.

While Marrakesh has a plethora of museums and attractions, including the newly opened Yves St. Laurent museum and the stunning Jardin Majorelle, there is no shortage of Jewish sites either in the medina or the mellah. To orient oneself in the medina, start at Jemaa el-Fnaa, a large public square with merchants hawking their wares and a variety of mesmerizing entertainers, including snake charmers. After shopping in one of the medina’s many souks, head over to the mellah to visit Lazama Synagogue, built in 1492 around a central courtyard, and located on Rue Talmud Thora (Talmud Torah Street). It was no easy feat to find in the maze of alleyways, but our group had the fortune of running into young neighborhood boys, who told us in Hebrew, “s’mol, s’mol” (go left, left).

A graveside shrine to Solica Hatchouel, a Jewish girl murdered in the 18th century for refusing to convert to Islam.

We returned to the Atlantic coastline to visit the enchanting city of Essaouira, which, as our guide Rashida described it, has a rich Jewish history and excellent Jewish-Muslim relations. It was also where the third season of “Game of Thrones” and parts of Orson Welles’ “Othello” were filmed. She explained other Jewish influences on Moroccan culture, noting that the tassels on the “jelabela,” a robe-like dress, represent the Torah; and that the Moroccan flag, until 1915, displayed a Jewish star. Morocco, she said, is not a melting pot, but rather a “mosaic.”

While there are only about 20 or so Jews left in Essaouira, there once were more than 36 synagogues in the city, in which the famed Rabbi Haim Pinto, a psychic who was said to perform miracles and whose tomb rests in a mausoleum inside the Jewish cemetery, resided; the site is a major pilgrimage for Moroccan-Jewish expats seeking blessings and inspiration. The medina hosts his family residence and synagogue, as well as the “Slat (synagogue) L’Kahal Mogador,” which dates to 1865 and celebrated its second inauguration in October 2017. A third synagogue we visited in the mellah, Simon Attias, was in the process of being restored.

Lori Silberman Brauner is deputy managing editor at New Jersey Jewish News, The Jewish Week’s sister publication.