Many Turkish Jews are thinking of leaving the country due to burgeoning anti-Semitism, the New York Times writes, but their favored destination is not Israel or the huge Jewish community of the United States.

Instead, the would-be emigrants are looking to Spain, where the parliament is due to vote this month on whether to grant Spanish nationality to the descendants of Jews expelled from the country during the Inquisition of 1492.

Today's Turkish Jewish community is descended from the estimated half-a-million Spanish Jews who took refuge in the Ottoman Empire after being expelled from Spain.

“The Jews were not just permitted to settle in the Ottoman lands, but were encouraged, assisted and sometimes even compelled,” historian Bernard Lewis wrote in his book “The Jews of Islam.”

Starting in the 15th century, large and influential Jewish communities sprouted throughout the wide-flung Ottoman Empire, notably in Salonika (today Saloniki, in Greece) and Constantinople, today Istanbul.

But the Turkish Jewish community has been in decline ever since the founding of the secular Republic in 1923. Tens of thousands went to Israel after 1948 and those who remained came under pressure to assimilate.

Today the community numbers only 17,000, according to figures from the chief rabbinate in Istanbul, with a scant 65 Jews remaining in Bursa, the northwestern province where the first Sephardic Jews arrived by sea in the 16th century.

In recent decades, synagogues have been targeted in terror attacks and growing anti-Israel sentiment in recent years has been accompanied by a surge in anti-Semitism.

Though President Recep Tayyip Erdogan recently asserted that he was the first Muslim leader to denounce anti-Semitism, his testy relations with the government in Jerusalem and his penchant for conspiracy theories have been blamed by observers for encouraging anti-Jewish sentiment.

Anti-Jewish sentiment is not uncommon in the Turkish news media, but a recent newspaper crossword puzzle, which portrayed an image of Adolf Hitler with the slogan, “We are longing for you,” sent shock waves across the country.

Another recent incident was a “May God bless Hitler” post on Twitter by a well-known singer, The mayor Ankara, Turkey's capital, applauded the post and encouraged others to chime in.

“In Turkey, you could say anti-Semitism is marginalized, until you turn on the TV and see the president and other politicians cursing Jews in public,” said Louis Fishman, an assistant professor at Brooklyn College who specializes in Turkish-Israeli affairs. “When you have public displays of hate speech from politicians, it changes the landscape considerably.”

The rise in anti-Jewish sentiment is often blamed on the actions of the Israeli government. That was heightened by the Mavi Marmara incident in 2010, in which nine Turks were killed, the high death toll in Gaza during last summer's war.

“If the Turkish Jewish community does not put an end to Israel’s actions, very bad things happen,” said Bulent Yildirim, president of the IHH Humanitarian Relief Foundation, whose organization sponsored the Mavi Marmara. For most Jews, however, that amounts to collective punishment.

Selin Nasi, a columnist for the Jewish weekly Salom, acknowledged that Turkey had taken some positive symbolic steps to improve relations with Jews, including the restoration of the Great Synagogue of Edirne and Turkey's participation in the United Nations’ Holocaust Day for the first time this year.