Numbers paint a stark picture for the future of Turkey’s steadily shrinking Jewish community. Forty percent of the population is preparing a possible exit route from a land that has harbored Jews since Ottoman times.

Over the past 15 months — a stormy political stretch culminating in a disputed vote to expand President Recep Tayyip Erdoğan’s already substantial executive powers — close to 4,700 Turkish Jews applied for or received passports from Spain, Portugal and Israel. When children of applicants to Spain are added in, the number balloons to over 6,200.

The number is cause for concern in a community that totals just 15,500, a remnant of hundreds of thousands of Jews who lived in the region during Ottoman times, when the sultan gave refuge to thousands of Jews fleeing the Spanish Inquisition.

While there is no mass exodus underway, several forces are motivating Turkish Jews to take out an insurance plan on their future.

“Turkey is more authoritarian, less liberal, less democratic and more Islamic,” explained Yoram Zara, an attorney who moved to Israel from Turkey and specializes in Sephardic citizenship. “I think most of the younger generation understand they have a problem if they want their children to grow up Jewish.” Zara pointed to the weakening economy as another reason Turkish Jews, especially the younger generation, are seeking citizenship abroad.

In 2015, applications for foreign passports began to surge after Portugal passed a law making it easier to establish Sephardic heritage than in Spain. Between March 2016 and December 2016, an estimated 13% of the Jewish community applied for passports. In the same period, Spain approved 2,400 Turkish Jews whose applications were pending. The prize is an E.U. passport that allows Turks to travel, work and live throughout the European Union.

The reasons for pursuing an exit plan vary. But a common thread is fear. Erdoğan, the former prime minister and leader of the ruling Islamic AKP party, is relentlessly consolidating his authority with mass purges and a clampdown on the news media following a failed coup attempt against him by a group of military officers last July.

In April, voters narrowly approved a referendum that grants sweeping new constitutional powers for the president. Erdoğan’s opponents charge that the referendum was rife with fraud, including some alleged instances caught on video, charges Erdoğan denies. The vote leaves the nation deeply polarized between religious and secular Turks and marks a historic shift away from the constitution that created modern Turkey’s secular republic. It essentially cements emergency powers invoked by Erdoğan after the attempted coup.

Those powers have led to the dismissal of more than 130,000 people from their jobs and to the arrest of about 45,000; to the shutdown of independent news outlets and arrests of journalists, and to the injection of religion into secular institutions, eroding the separation of Islam and state.

The crackdown continues with regular roundups and decrees, such as the recent blocking of the online encyclopedia Wikipedia and a ban on TV dating shows.

These moves are breeding an atmosphere of fear and uncertainty, not just for Jews but also for secular Turks, who make up nearly half the population. Many say it’s all too common to discover that friends who lost a job or worry they’ll be rounded up are moving away. And there are trumped-up political threats. Zara recounted how a blackmailer targeted his wealthy, elderly aunt, threatening to turn her over to police unless she paid up. “She paid and fled to Israel,” said the attorney. “People are losing trust in law and order.”

Ask writer Denis Ojalvo about the state of the Turkish Jewish community, and he points to the portrayal of Jewish characters in a historical fiction TV series named “Payitaht,” airing on a Turkish state TV channel. It debuted as the divided nation prepared to vote. Episodes show Jews attempting to assassinate the 34th Sultan Abdul Hamid II, and depict Theodor Herzl, the visionary behind modern Zionism, as tricking the sultan into founding the State of Israel.

“The message is that the Jews destroyed the Ottoman Empire,” said Ojalvo, who writes for the Istanbul-based Jewish weekly Şalom. He blamed the series for a spike in anti-Semitic posts on social media. “It’s a way to create ratings for the TV channel. But it poisons public opinion.”

An Increasingly Autocratic And Islamic Turkey Is Scaring Its Jews

He is worried about an ongoing brain drain as more people send their children to study abroad and urge them to stay abroad afterward. “That’s a problem,” Ojalvo said. “We need our sons and daughters.”

Erdoğan insists he’s not anti-Semitic. But polls document a rise in anti-Semitism over the past decade, as his AKP party has grown in popularity and in power.

Jewish institutions are heavily guarded, with stepped-up security after the bombing of two Istanbul synagogues in 2003 that left 20 dead. Members of the community live under the radar, and children are taught to ignore harsh criticism of Israel.

The average Turk doesn’t always make the distinction between Israel and Jews, and in a country of 80 million, most have never met a Jew, leaving them vulnerable to unfounded attacks and negative portrayals. “Social media reaches millions in a minute. It affects the younger generation,” said one prominent community leader who didn’t want his name used.

After the referendum vote, there’s a wait-and-see attitude. Portuguese applications started leveling off earlier this year. “People who wanted a passport have applied,” said Ceyda Habip Metin, who is a representative of the tiny Porto Jewish community in Portugal and helps applicants document their Sephardic heritage. Yet laws keep changing, like a just-passed Portuguese provision making it easier for parents to include children in their citizenship requests. Spain, meanwhile, has eased its language requirements for elderly Jews. “If you’re over 70, you don’t have to pass the Spanish exam,” said Karen Şarhon, who works to help certify applicants’ ties with Sephardic culture and the Ladino language.

As coordinator of the Ottoman-Turkish Sephardic Cultural Research Center, Şarhon works to preserve the country’s Sephardic culture. She also publishes a monthly supplement in Ladino, distributed by Şalom — the only one remaining in the world. Despite her love of Turkey and her confidence in its future, her own daughter is studying in Israel, where she can get a more affordable, top-notch university education. Şarhon hopes that after graduating, her daughter will take advantage of their dual citizenship. “She may possibly get her masters in Spain,” she said.

Jews lived for centuries on the Iberian Peninsula under Arab Muslim rule, during which they enjoyed periods of high cultural, economic and political achievement. When Spain and Portugal banished Jews under Catholic rule five centuries ago, tradition has it that anguished families left with the keys to their homes, hoping to one day return. The keys were handed down from generation to generation. There’s even a recent account in a Portuguese newspaper about an elderly Turkish Jew who traveled back to his ancient Portuguse village and tried his key in door after door, with no results. Younger Turkish Jews aren’t counting on rusty keys. If the time comes, many of them hope that foreign passports will unlock a new future abroad.

Contact Tia O’Brien at feedback@forward.com