The City of Light is losing its Stars of David.

As a rash of anti-Semitic ­attacks, largely at the hands of Islamists and extremist political groups, has hit France, many Jews are fleeing.

“In the last couple of years, [there have] been hundreds [of French Jews] moving to New York City,” said Steve Eisenberg, co-founder of the Jewish International Connection of New York, a Manhattan group that helps international Jews acclimate to the city. “They’re here because they just can’t breathe as Jews in France. There’s no Jewish future there. You can’t walk in Paris wearing a yarmulke. You’re taking your life in your hands.”

In January, an 8-year-old outside his Jewish day school in Sarcelles was beaten to the ground, and a 15-year-old girl wearing a Jewish school uniform was slashed across the face by an unknown man.

On Jan. 9, fire roared through two kosher Paris markets, weeks after swastikas were painted on both stores. Although authorities suspect the fires were arson, the date is significant: It was the third anniversary of the ­Hyper Cacher supermarket massacre in Paris, in which gunman Amedy Coulibaly murdered four Jewish customers during a hostage situation. Before he was killed by police, Coulibaly demanded that Saïd and Chérif Kouachi — brothers who had committed a murderous assault on the offices of the Charlie Hebdo newspaper days earlier — not be harmed when found. (The same day, the siblings were killed during a police raid.)

Last year, two yarmulke-wearing Jewish brothers were attacked in a Paris suburb by thugs wielding a hacksaw, and 65-year-old Orthodox physician Sarah Halimi was found dead outside her apartment. Neighbors reported hearing the accused murderer, a Muslim from Mali, yell, “Allahu akbar,” before he allegedly pushed her out a window. After President Emmanuel Macron called for an investigation, the case was classified as an anti-Jewish hate crime.

Julia Buchwald, a Parisian émigré now living on the Upper East Side, has grandparents who survived the ­Holocaust by moving from Poland to France and hiding in the north. “They moved to France, not knowing what would happen in France,” she said. “[Now] it’s the same situation as my grandparents.”

During World War II, much of France’s Jewish contingent escaped the horrors of concentration camps — though about 72,500 perished.

Today the country has the third-largest Jewish population, after Israel and the US, with around 500,000 people. Many of them are the descendants of refugees displaced from North African nations such as Algeria and Morocco, who fled in the 1960s after those countries won independence from France and tensions heated.

Eighteen years ago, however, the Jewish population in France was around 555,000. “Since 2000, the number of Jews leaving France out of fear for their safety . . . has increased drastically,” said Ari Afilalo, a Paris native who is now the president of the West Side Sephardic Synagogue in Manhattan. (American and French migration officials do not keep statistics on the number of Jews moving from France to the US.)

“It’s a climate of fear,” said Robert Ejnes, executive director of Representative Council of French Jewish Institutions, a Jewish communal ­organization in Paris.

Over the past decade in France, anti-Semitic hate crimes have reportedly averaged roughly 566 a year. The highest yearly total, 851 incidents, came in 2014, according to Simone Rodan-Benzaquen, director of Jewish advocacy organization AJC Europe.

“Although Jews represent less than 1 percent of the French population, 40 percent of all violent hate crimes in France are anti-Semitic,” she said.

President Macron, following the attack on the 8-year-old boy, tweeted on Jan. 31 that “the whole country . . . must rise up today alongside French Jews to fight with them against these disgusting attacks.”

Here, three Jewish people who left France for New York tell The Post their stories.

Geraldine Chetrit and her husband had been mulling a move to New York when the Hyper Cacher siege happened in 2015, convincing them it was the right ­decision. They sold her catering business and bought one-way tickets for themselves and their children — a daughter, now 6, and a son, 4 — two months after it happened.

Her family is fortunate in that her husband’s company sponsors their visas. Still, “this isn’t what we imagined at this point in our lives, to start over from scratch.” But Chetrit, 42, felt she had no choice because the situation in France is “not going to get better. Everyone with kids is thinking how to get away. You hear ‘sal Juif’ [‘dirty Jew’] all the time.”

And she lived in a bubble. Chetrit and her banker husband had saved enough money to buy a home in a “safe” Jewish community in Neuilly-sur-Seine.

“In France, [Jewish people] work to be able to buy an apartment in that neighborhood,” Chetrit said. “We created an environment where we didn’t have to leave. We had everything: cinema, ­kosher restaurants, supermarkets, schools.”

Now, living on the Upper West Side, one of her biggest freedoms is being able to ride public transportation without fear of attack.

“You can’t afford to take the subway in France and risk something for nothing,” said Chetrit, now employed as a freelance fashion publicist.

She added that some ingrained attitudes don’t simply fade away. Even today, her son and husband don’t wear yarmulkes on the streets of New York. “There’s no need to show anything — for what? In France, you’re Jewish at home.” But now America is home.

“For us, it’s not an option to go back.”

When Hanna Chicheportiche, now 22, moved to Manhattan from Paris two years ago to study political science at Yeshiva University, she wasn’t so worried about herself.

“I’m lucky, because I look Arabic. I don’t look Jewish. I can blend,” she said. “But my brother looks like a Jew. He dresses like a Jew. [Two years ago] when he was 16, he got mugged by a Muslim man. The guy was like, ‘You’re Jewish, you have money, what do you care?’ ”

She recalls how, growing up, the children and teens of her community were taught to avoid certain parts of the city for their safety.

“The park where all the Jewish kids would hang out on Shabbat became a battleground,” she said. ­“Police would warn the Jewish kids not to go there because the Muslim aggressors came with bats.”

Now the single Murray Hill resident is desperate to get her family out of France. But, as they own a hotel business there, “they can’t just drop and leave everything.”

As for herself, Chicheportiche — who has US citizenship because her mother was born in America — has no plans to return to her home country.

“I don’t want to live in France,” she said. “Of course it’s going to get worse.”

From her first few days in New York City, she said, she felt safer and more liberated.

“It felt amazing just to see rabbis walking around with their kippa, just people walking around not being scared,” Chicheportiche said. “Being in a country where it’s normal to be comfortable with your Judaism is really a relief.”

Growing up in Le Marais, a neighborhood in Paris, Julia Buchwald, now 29, always dreamed of one day being a mother.

But when three young students were killed at their Jewish school in Toulouse in 2012 — murdered, along with an adult, by a Muslim man with a gun — her ­maternal hopes began to waver.

“I don’t feel safe having children in France. There are armies standing guard outside of every Jewish school,” she said.

She left her native country in 2014 and is happy with her decision. Now settled on the Upper East Side and employed in marketing (which is how she obtained a work visa), Buchwald said she feels “more in control of my life.”

Moving from Paris to New York, Buchwald — as with the other women in this story — chose not to apply for refugee status, nor would they likely be eligible, as their home country aims to protect them from persecution.

She sees a certain irony in her situation. Like her Polish-born grandparents before her, she chose to leave her country because of anti-Semitism. But while they fled to France, she had to turn her back on that country.

“It’s funny,” she said. “There is an old expression [derived from old Yiddish] we used to say: ‘Happy as a Jew in France.’ ”

But now she is looking for a new happy ending for herself in America.

“If I find the right guy, I’d be happy [to have Jewish children in New York] — without fear.”