It’s a hot summer day when I arrive at Khmis Arazan, a small rural town in southern Morocco, about 170 miles south of Marrakesh. It’s Thursday, market day, and a group of local children spots me. Before I say a word, they know where I’m headed. There’s only one reason why outsiders find their way to this remote community: to visit the synagogue.

It has been four decades since the last of the Jews left Khmis Arazan, whose 8,000-some residents are nearly all Muslims. But it’s clear from the well-trodden path that more than a few tourists have made their way down these unpaved streets to the now crumbling Jewish neighborhood.

Arriving at the synagogue — an adobe structure dating from the late 19th century and recently renovated — I am greeted by Hmad Harim, a Muslim man in his late 60s who has spent much of his life working as caretaker for this relic of Morocco’s rich Jewish past.

More than 130 Jews lived in the town as recently as the 1930s, and Harim has vivid memories of the Jewish neighbors in his childhood, even recalling many of their family names.

“Every Friday, I used to hear the sounds of their prayers — it was as normal as our Friday prayers for us [Muslims],” he told me. “I will never forget those times.”

Harim isn’t unique. In my travels throughout my native Morocco, I have met people like him again and again — Muslims who have taken it upon themselves to protect and maintain the places that were holy to their country’s all-but-vanished Jewish community.

“I think of this as a moment of consolation in the wave of hatred that reigns in today’s world.” — Simone Bitton

I am a Muslim-born historical anthropologist specializing in studying the Jews of North Africa. Years ago, I noticed that whenever I would visit a Jewish cemetery in Morocco, I would notice a sign near the entrance listing the phone number of the caretaker. If the cemetery lacked a wall or fence, sometimes the number was posted on a rock by the roadside. Every time I called one of the numbers, the person who answered was a Muslim, often someone who had inherited the task from a parent or even a grandparent.

The work of these dedicated guardians has become all the more remarkable in an era in which U.S. Jews have seen their cemeteries desecrated in suburban St. Louis and Philadelphia, and vandals have repeatedly defaced synagogues with swastikas and anti-Semitic graffiti in the U.S. and Europe.

While Morocco also has experienced its own occasional vandalism incidents at Jewish sites over the years, such desecration is relatively rare, in large part thanks to the Muslims who have taken on the protection of Jewish sites as a sacred responsibility.

In the coastal city of El Jadida, I met Abbas, who has served as guardian of the cemetery since the 1950s. In Ighil N’Ogho, a village south of Marrakesh, a woman named Zoubeida holds the keys to the recently restored synagogue. In Essaouira, Malika Idarouz and her son guard two Jewish cemeteries and the Synagogue of Haim Pinto, named for the prominent Moroccan rabbi of the 18th and 19th centuries.

When I met Malika in the summer of 2017, she assured me that “no matter what goes on in the world,” Muslims will always be there to care for Morocco’s Jewish cemeteries, places she called “a reminder of the history of Jewish-Muslim relations.”

The Moroccan Jewish community is one of the oldest in the Arab world. Before the early 1950s, some 240,000 Jews lived in Morocco, but in the three decades that followed, nearly the entire Jewish population emigrated, with most going to Israel, but also to Canada, France and South America. Now, fewer than 3,000 Jews remain.

Historically, Morocco’s Jews lived under the protection of the country’s sultans and kings. Outside the sultans’ rule, tribal lords ensured their security and protection. Linguistically and culturally, Jews mostly shared customs with Morocco’s Muslims. And they worked in a variety of occupations, including as artisans, peddlers and merchants.

Although Jews once paid a special tax in exchange for physical protection, since Morocco gained independence in 1956, Jews have been considered citizens with full rights.

What remains of Morocco’s Jewish community is mostly centered in a few cities: Casablanca, Rabat, Marrakesh and Fes. While Casablanca has Jewish schools, a few synagogues that hold services and, of course, a Chabad emissary, the Jewish population is aging, and most younger Jews tend to immigrate to Europe.

Despite the dwindling Jewish population, Moroccans are determined to preserve the community’s sacred places. That effort was led in part by the Foundation of the Judeo-Moroccan Cultural Heritage, established in 1995 to safeguard both the community’s “material” heritage — its synagogues, cemeteries and shrines — and its more intangible elements, such as literary works, food and music. Its work has resulted in the restoration of more than five synagogues as well as maintaining a Jewish museum in Casablanca.

But preserving Morocco’s Jewish relics isn’t a uniquely Jewish effort. In 2011, Morocco took the unusual step of changing its national constitution to acknowledge that the country has been “nourished and enriched” by “Hebraic influences.”

“In Morocco, you do not need to teach people that they should respect the dignity of the dead, Jewish or Muslim.” — Brahim

And in 2010, Morocco’s King Mohammed VI launched an initiative to preserve Jewish cemeteries. Through that program, overseen by Serge Berdugo, the head of the national council of Jewish communities, the country preserved more than 167 cemeteries and some 12,600 individual graves. The project included erecting protective fences, clearing grounds, washing and restoring gravestones, and installing new gates and doors. (The effort is documented in a 2015 book, “Rehabilitation of the Jewish Cemeteries of Morocco: The Houses of Life,” published by the Council of Jewish Communities of Morocco.)

While Jewish community leaders oversee the efforts and the sites, it is the Muslim caretakers — often working for no salary — whose work has made it a reality. Many of these people see the cemeteries as living archives, memorials to an important part of their country’s history, an element that an ever-smaller portion of Moroccans remember.

“In Morocco, you do not need to teach people that they should respect the dignity of the dead — Jewish or Muslim,” said Brahim, the owner of the Jewish museum in Akka when I interviewed him several years ago. “It’s part of our culture.”

The pilgrimage trend isn’t likely to slow down, thanks to efforts by the government.

Simone Bitton, a Moroccan-born filmmaker who now lives in France, has spent more than a year working on a documentary with the working title “Ziyara” (Arabic for “pilgrimage”) about the Muslims who guard Jewish cemeteries. She said she became fascinated by these men and women, who often live in cemetery compounds and spend their days watching over Jewish graves, some centuries old.

“It is a very moving experience for me as a Jew,” she said. “These are ordinary, illiterate people who made an effort to learn Hebrew script — and they are familiar with Jewish tradition.”

For example, she said, caretakers often ask her whether she is a Kohen, because they know Jewish law forbids Jews with that designation from being in close proximity to graves. And cemetery guards often ask her to wash her hands before leaving the cemetery, in accordance with Jewish tradition. Many guards have learned such customs as well as Jewish prayers or phrases either from their childhoods or from stories passed on by parents or grandparents, Bitton said.

Moved as she is, Bitton also acknowledged that many of the guards have financial incentives for their work. They rely on tips from visitors and other cemetery-related income to support themselves and their families.

Still, she said, she finds the guards’ devotion inspiring. “I am not naïve,” Bitton said, “but I do think of this as a moment of consolation in the wave of hatred that reigns in today’s world.”

While that may be, there are other incentives for the preservation efforts, not only for the caretakers but for the country. In recent years, many Jews with ancestry in Morocco have traveled to the country to seek out their roots, visiting their ancestral hometowns and searching for the graves of grandparents or great-grandparents. Jews travel to the country for hilulot, visits to shrines marking the tombs of prominent rabbis and other holy figures.

The pilgrimage trend isn’t likely to slow down, thanks to efforts by the government. In February 2013, at the dedication of a newly restored synagogue in Fes, the king called for the restoration of other major Jewish places of worship. That led to the restoration of Casablanca’s Ettedgui Synagogue, completed in 2016. Another landmark, the Simon Attias Synagogue in the city of Essaouira — dating back to 1882 — is currently under renovation. And André Azoulay, a prominent Jewish leader who is an adviser to the king, has plans to open a museum and research center at the Simon Attias Synagogue in 2018 focused on Judaism and Islam.

Azoulay also has been involved in efforts to organize music festivals in towns near the shrines of historical Jewish figures, events partly aimed at attracting Jewish tourists to the country.

Those who might not be able to make the trip to Morocco have another way to seek out the final resting places of their ancestors: in cyberspace. That effort is led by Georges Sebat, who was born in Morocco and lived in Montreal before settling back in Casablanca in 1993. Sebat has documented several Moroccan cities’ Jewish cemeteries on websites such as cimetierejuifcasablanca.com and communautejuiveagadir.com, where users can find photographs of their ancestors’ tombs.

Sebat explained that the project stemmed in part from his interest in a massive 1960 earthquake that that killed as many as 15,000 people in his hometown of Agadir. Passionate about computers and technology, he developed a website in memory of the city’s entire Jewish community. That included making photos of the tombs available on a website. “For the family members outside of Morocco who wished to ‘visit’ the graves of loved ones, it was, of course, much appreciated,” Sebat said.

Sebat received significant assistance from a man named Si Ali, the Muslim caretaker of the Agadir Jewish cemetery, who was himself a survivor of the earthquake.

“He had a complete devotion to this place,” Sebat said. “It was his work, and he was the encyclopedia and the memory of the cemetery until his death.”

Now it is Ali’s son, Mohamed, who does that work, caring for the graves of a community he never knew with dedication and kindness. Like so many other caretakers I have met in my travels, he is carrying on a legacy of respect and coexistence that crosses barriers of religion, nationality, memory and time.

As Bitton, the filmmaker, put it, “I want to know what is left of the Jew in the imagination of these Moroccan Muslims.”

I asked Harim — the Muslim caretaker in the town where the kids led me to the synagogue — what would possibly motivate a Muslim to devote his life to this kind of work. He didn’t hesitate to offer an answer. “The synagogue and the cemetery are a trust,” he said. “Our religious consciousness and moral obligation demand that we keep them safe. We did it when they were among us, and we knew that their owners would come one day to reclaim these places. I’m glad I did it.”

Aomar Boum is associate professor and vice chair of undergraduate studies in the anthropology of department at UCLA.