The Jewish religious command to welcome the stranger has been front and center in the debate over President Trump’s travel ban. Now, it’s getting a workout — with an intensely local twist — in the ongoing controversy over Mayor de Blasio’s plan to locate homeless shelters in Crown Heights, home to the Chabad-Lubavitch movement as well as a growing influx of non-chasidic Jews.

As locals hotly oppose the two new facilities — a 104-bed men’s shelter at 1173 Bergen St. and a 132-family shelter at 267 Rogers Ave. — Jewish residents struggle to balance the injunction to care for the poor with fear of increased crime.

“We have to approach this whole thing with compassion for these families.”

“We have to approach this whole thing with compassion for these families,” said Eli Cohen, director of the Crown Heights Jewish Community Council, a social service organization representing 60 Jewish congregations in the neighborhood. That said, he is concerned with new shelters will correlate with a “high incidence of crime.”

A spokesman for the Department of Homeless Services, Isaac McGinn, said that residents received “more than 75 days’ notice for this facility,” responding to complaints that little warning was received. The city will also continue “holding public meetings to solicit input, and, where possible, making adjustments based on community feedback to ensure our facilities are seamlessly integrated into the community,” he said in an email.

Baruch Herzfeld, 45, a member of the growing Modern Orthodox community in the neighborhood, said that while he “doesn’t have a problem with the shelter,” he doesn’t trust the city to fairly distribute shelters or manage them effectively. Herzfeld’s house is around the corner from the men’s shelter set to open on Bergen.

“I support homeless shelters, as long as they are fairly distributed and the community maintains some sort of oversight or control.”

He stressed that safety is not his concern. “I support homeless shelters, as long as they are fairly distributed and the community maintains some sort of oversight or control,” he said. This, Herzfeld fears, will not be the case.

David Spencer, 32, a Crown Heights resident for the past decade who considers himself part of the Modern Orthodox and Chabad communities, voiced strong support for the shelters, though he was among the few interviewed by The Jewish Week who did.

“Fear makes people overlook what they know is right,” he said. He referred to the Crown Heights conversation as “fear of refugees 2.0.” “As a frum Jew, I can’t think of a more modern way to practice taking in the stranger than taking in the homeless.”

Yossi Stern, 47, former head of the Crown Heights Safety Patrol, one of the first Jewish crime patrols in the country, said he fears a homeless shelter that hosts families short-term will “continue the cycle of poverty and eviction.” He believes the Rogers shelter would be better used as a permanent, low-income housing facility for families.

According to the DHS, 80 percent of the Rogers building’s units will be set aside for homeless families and the other 20 percent will be affordable apartments. The average stay for families in a New York City shelter is approximately one year.

“This space should be used to save families from the shelter system, rather than subject them again to this vicious cycle.”

“This space should be used to save families from the shelter system, rather than subject them again to this vicious cycle,” said Stern.

Yaacov Behrman, a member of Community Board 9, which covers the portion of Crown Heights south of Eastern Parkway, agreed.

“The purpose of this facility is to help displaced Crown Heights families move back to the neighborhood — we should fight for these families to return on a more permanent basis,” said Behrman, who directs a drug prevention program in Crown Heights for public and private school students.

“As an Orthodox Jew, I can’t oppose a shelter. But we as a community [have] a responsibility to rehabilitate families, and that requires a longer-term solution.”