JERSEY CITY — The JC Kosher Supermarket sits on a block that appears the portrait of the American cultural melting pot.

Across the street is a Catholic parish. A few storefronts away in one direction is an African hair braiding salon, in the other a mosque. The entire block rests a few miles from Ellis Island, settled in the shadow of the Statue of Liberty.

Yet the market, and the ultra-Orthodox families that frequent it, also nods to a more complicated if equally American story: that of a poor black community that after decades of underinvestment has seen a wave of redevelopment and new arrivals.

More than 100 Jewish families have moved here in recent years, fleeing astronomical housing costs in Brooklyn and settling into affordable homes across the Hudson in the heart of a historic black community.

While their arrival prompted fears that there would be tension between Hasidic arrivals and the black residents who have been here for generations, many who have moved here say they have found friendly neighbors who made them feel at home.

Then, on Tuesday, a horrific attack threatened to shatter that goodwill.

Two shooters stormed the kosher market, killing three people inside — 31-year-old co-owner Mindy Ferencz; store employee Douglas Miguel Rodriguez, 49; and customer Moshe Deutsch, 24 — then engaged in an hours-long gun battle with responding officers as dozens of horrified Jewish children were huddled in the community center one floor above.

“The first thought on all of our minds was: Who did this? Why did they do it? Was this one of our neighbors?” said Yossi Berger, who moved here with his family from Brooklyn last year. “Did they do this because they’re mad we’re moving here?”

Law enforcement officials announced Thursday that the attack is being investigated as an act of domestic terrorism. Local officials said that the shooters, David Anderson, 47, and Francine Graham, 50, who were killed at the scene, had previously shared anti-Semitic posts on Facebook.

“We believe the suspects held views that reflected hatred of the Jewish people, as well as the hatred of law enforcement,” New Jersey Attorney General Gurbir S. Grewal said at a news conference.

As investigators continue to probe the attack — which comes amid a rise in anti-Semitic violence nationally — this city is grappling with whether the attack reflects underlying ethnic tensions locally and fears that it could spark new ones.

Longtime black residents and ultra-Orthodox implants alike say that they haven’t experienced significant ethnic tensions here, but all stressed the importance of not allowing this targeted attack to pit the two groups, both suspicious of outsiders, against the each other.

“We have been welcoming to any nationality that has come here,” said Joyce Watterman, who is black and represents the area on the city council. “These are loving people. These people do not have hate in their heart, and I want to make that clear — I really want to make that clear — we always are welcoming and will continue to be welcoming.”

The Jersey City neighborhoods that surround the shooting scene were established in the mid-1800s, one of the first communities in the state set up by free black people. For nearly a century, it was a thriving enclave with a racially mixed economy that included Jewish and Italian store owners serving a predominantly black populace, said Max Herman, who runs the urban studies program at New Jersey City University, located a few blocks away from the market.

Yet, as was the case in cities across the country, the development of suburbs in the 1950s and ’60s led to an exodus of most of the area’s white residents, later followed by many middle-class black families once the Fair Housing Act empowered them to pursue suburban living as well.

The loss of moneyed residents and their businesses was coupled with the departure of manufacturing jobs — which were relocated to the South and later overseas — leaving behind an underresourced urban core of poor black and brown people left to fend for themselves as violence and drugs spread.

“It was allowed to basically deteriorate over time,” Herman said.

But for the Hasidic community, long clustered in parts of Brooklyn, Jersey City represented an opportunity. With Brooklyn real estate prices skyrocketing, many had discussed seeking out a more affordable option.

“It was impossible, even for a family making $90,000 a year, to afford a normal-sized house. People were going broke,” recalls Berger, who moved to Jersey City with his wife and their three kids in May 2018. “So we looked across the river, and the first city we see over there was a nice community with very cheap house prices.”

Today, almost all of the Jewish families living in the area that surrounds Martin Luther King Drive are Brooklyn transplants.

“Of course, we were a little bit scared. We didn’t know what to expect,” Berger said. “We were new people, with a different culture. But as time went by, it was clear we were welcome.”

Berger said he was pleasantly surprised by how warmly he was received by his neighbors. There were occasions in which local children or teens made comments about their beards or hats, but nothing that made Berger feel unsafe. At times, ultra-Orthodox families ruffled feathers by aggressively door-knocking and asking residents if they were interested in selling their homes. But, Berger and others say, that created small tensions that were easily defused.

“Nothing vicious, just little comments. But it was because we were a new set of people who were interesting to them,” he said. “We always felt safe.”

Soon, the Hasidic families who had moved to Jersey City had set up a full community of infrastructure: yeshivas for their children to attend school, a Judaica store, a butcher and the JC Kosher Supermarket — run by Moishe and Mindy Ferencz, known by their neighbors as the “pioneers” who first relocated from Williamsburg in Brooklyn to Jersey City.

The Jewish community “is the best thing that can happen to this city,” said Fred “Sluggo” Marshall, 83, a lifelong resident and street preacher who is black and owns Sluggo’s Laundromat, two blocks down MLK Drive from the Kosher market.

Marshall said that for as long as he can remember, there have been Jewish residents of Jersey City, which is why it didn’t bother him to see the influx of ultra-Orthodox residents in recent years. While there are always neighborhood tensions, he said he didn’t think black residents were hostile.

“Something like that has never happened in this city since I been here,” Franklin said of the shooting, speaking Thursday afternoon as he stood and read the Bible outside of his laundromat, which has speakers affixed to the exterior that blast gospel songs and sermons. “I don’t think it’s going to happen again. It’s something to wake people up, make them open their eyes.”

Still, other longtime residents note, the influx of Hasidic residents comes as many of the longtime black residents feel increasingly squeezed. The downtown region, as well as nearby Newark, is rapidly redeveloping — bringing construction cranes and hipsters.

The money pouring into the city has brought with it jobs and new housing. But for many of the poor black residents who long lived here, both feel inaccessible. The city is changing, and they feel like they’re being pushed out with no where to go.

“The city has been going through rapid change, and our concern is that, as the physical condition of the area is changing, we want the socioeconomic condition to improve for the people who are already here,” said the Rev. Nathaniel Legay, president of the local NAACP, which has its office based up the street from the market. “Instead, too many people feel like they are being forced out of the community.”

Legay said that this week’s attack is the first time he has seen hostility toward the newcomers, but echoed others’ concerns that they could become scapegoats if longtime residents continue to feel left behind.

“If there is an underlying issue that has not been fully addressed and dealt with, it’s bound to erupt at some point,” he said. “My prayer is that this is not the beginning of something worse.”

For days, the Hasidic families in Jersey City have lifted the same prayer.

Police say the attackers began Tuesday’s killings at a cemetery, fatally shooting veteran Jersey City Detective Joseph Seals — a father of five — who had approached a U-Haul van because it had been reported stolen and was linked to a weekend homicide. The assailants then drove the van to the kosher market.

The shooting left the local Jewish community deeply traumatized. Nearly all of them knew the victims personally, and most families visited the market nearly every day. The community center, their primary gathering place, sits next door and dozens of children had been present when the shooting took place — their teachers rushing them into closets and leading them in prayer.

“Nobody can sleep, nobody can eat. Kids are waking up in the middle of the night screaming, ‘I hear shooting,’ ” Berger said. He noted that friends in Williamsburg have been volunteering to shuttle food across the river since, without a market, none of the families in Jersey City have been able to cook.

City officials raced to assure residents that they were taking the shooting seriously, labeling it a targeted attack on the Jewish community.

“If they’re going to trust us, we need to be forthright with them,” said Mayor Steven Fulop (D), who is Jewish. “I don’t know how anybody can interpret it any other way. We live in a time where it is important to call out hate for what it is and do it quickly.”

Yet Berger, like city officials, acknowledges it will take months, maybe years, for this small community to overcome the trauma of the past week. There have been vigils held each night since. The gathering Wednesday night was at a local synagogue. The one Thursday night was at a nearby church.

On Wednesday night, hundreds gathered at a nondescript house of worship not far from the shooting scene for Mindy Ferencz’s hour-long funeral. As police cordoned off the block, a young black man approached and inquired why he couldn’t continue down the street.

“I live on this block. Why is it blocked off?” he asked.

A reporter told him that the gathering was for the funeral of the woman who died at the kosher market.

“Oh,” the man responded. “I wish it was like that when one of my friends died.”

Then he walked off into the night, finishing a slice of pizza.

Shayna Jacobs contributed to this report.