PRAIA, Cape Verde (JTA) — A Portuguese rabbi and a Moroccan diplomat stood shoulder to shoulder in a Catholic cemetery here while 200 mourners howled in grief as they buried a resident of this island off the western coast of Africa.

The foreigners had come to Cape Verde’s main cemetery earlier this month not to bury a local, but for the rededication of 10 gravestones of Moroccan Jews — members of an extinct community whose roots trace to the 1860s.

With virtually no practicing Jews on Cape Verde today, the cemeteries had fallen into neglect. Now a Washington-based nonprofit is spearheading their restoration.

The Cape Verde Jewish Heritage Project has a board stuffed with prominent Jewish Washingtonians, but its funding comes largely from one man — King Mohammed VI of Morocco. According to the group’s U.S. tax filings, the king was the organization’s sole listed donor in 2011, giving $100,000. Smaller donors make up about a quarter of the project’s funding, the CVJHP said.

Andre Azoulay, a senior Jewish adviser to the king and a member of the project’s advisory board, told JTA that the effort is reflective of the king’s “deep commitment” to preserving Jewish heritage in Morocco and elsewhere. But even if, as some speculate, it is motivated by a desire to attract tourists and curry favor with American Jews, the king’s drive clearly sets Morocco apart from other Middle Eastern countries where Jewish sites have faced increasing threats under new Islamist governments.

“This is all part of a strong push from His Majesty the King that started three, four years ago, when we saw cemeteries have become vulnerable because of lacking care by all of us,” Azoulay told JTA.

Approximately 3,000 Jews are living in Morocco, a North African monarchy about the size of Texas that had been home to a large and thriving Jewish community for centuries. In the 19th century, a number of Moroccan-Jewish families resettled in Cape Verde, attracted by the financial potential of this transatlantic hub.

Over time the families totally assimilated, though their Creole-speaking, Christian descendants include some of Cape Verde’s most prominent businessmen and politicians, including the country’s first democratically elected prime minister, Carlos Alberto Wahnon de Carvalho Veiga.

Unlike many Arab countries with once sizable Jewish communities, Morocco has taken wide-ranging steps to preserve its Jewish history. The Casablanca Jewish museum was restored, the small but colorful 17th century synagogue in Fez was renovated, and dozens of former Jewish schools and more than 100 synagogues were rehabilitated with funding from the crown.

In 2011, in a move that Azoulay calls unprecedented in the modern Middle East, the Moroccan constitution was changed to note that the country has been “nourished and enriched … [by] Hebraic influences,” among others. The Moroccan parliament adopted the new language along with amendments that transferred some powers from the king to elected parties.

“I am not trying to paint a one-sided rosy picture. There are some difficult and maybe black pages in the book of Moroccan Jewry,” Azoulay told JTA. “But there are many, many more beautiful chapters.”

The king’s restoration activity already has brought benefits in the form of increased Jewish tourism. More than 19,000 Israelis entered Morocco in 2010, a 42 percent leap from the previous year, according to Israel’s Tourism Ministry. The World Federation of Moroccan Jewry says the kingdom receives another 30,000 non-Israeli Jews annually.

Among them was Joel Rubinfeld, the Brussels-based co-chair of the European Jewish Parliament, who spent 12 days in Morocco in March meeting with government officials and visiting his mother’s hometown. Rubinfeld believes the government’s intention to honor the country’s Jewish past is sincere, but he said other considerations are at work as well.

“There may certainly be pragmatic incentives: attracting tourism and investments down the line,” Rubinfeld said. “For some, it is a political calculation to improve Morocco’s international standing.”

A Moroccan diplomat, who spoke to JTA on condition of anonymity, said the restoration project could bring political dividends for Morocco, which has been accused of human rights abuses in Western Sahara, a disputed territory to which the kingdom lays partial claim.

“To Morocco’s great consternation, the U.S. last month proposed the U.N. peacekeeping mission in Western Sahara help monitor human rights,” the diplomat said. “It’s very useful for us to have someone — a strong lobby group, perhaps — to help talk the State Department out of this idea. The Jewish lobby is a very strong one.”

The board of the Cape Verde Jewish Heritage Project includes Howard Berman, a former California congressman who chaired the House Foreign Affairs Committee until his defeat last year; Daniel Mariaschin, the executive director of B’nai B’rith International; Herman Cohen, a former U.S. assistant secretary of state; and Toby Dershowitz, who heads a Washington public affairs consultancy.

But Azoulay grows indignant at any suggestion the king has his eye on the economic or political benefits of his largesse.

“This effort is the concrete manifestation of a consensus in Moroccan society, that our society is partly built on Jewish culture, a culture deeply rooted in three millennia of history,” he said.

“You have to understand the purity of it,” Azoulay added. “Those who think it is to attract tourists are just out of order.”

As popular revolutions have swept the Arab world since late 2010, Jewish heritage has suffered under newly empowered Islamist governments. Two Jewish cemeteries were desecrated earlier this year in Tunisia, prompting Israel to express concerns for the safety of the country’s Jews, the daily Maariv reported.

In Egypt, the government prevented several dozen Israelis from making the annual Passover pilgrimage to Alexandria’s main synagogue, one of the few properly maintained and functioning Jewish sites in the country. Egypt also briefly censored a film about the flight of its Jews following Israel’s establishment.

But in Morocco, a similar film, titled “Tinghir-Jerusalem: Echoes from the Mellah,” won a prize last month at the Tangier Film Festival. It also triggered protests from a few hundred Islamists and left-wing activists saying the film promoted “normalization” of ties with Israel, The Associated Press reported.

Still, many Jewish visitors speak of Morocco as a friendly place. Nuno Wahnon Martins, the director of European Affairs at B’nai B’rith International, said he felt safe enough to abandon all caution when asking for directions to synagogues during a recent visit. And Rubinfeld said he was surprised to hear a Hebrew song blasting from the stereo of a shop in Casablanca’s main market.

“Being a Jew in Morocco is safer today than on some streets in Brussels,” said Rubinfeld.