Lawyers representing San Francisco and Santa Clara County argued that Trump's executive order cracking down on sanctuary cities violates jurisdictions' 10th Amendment rights and could deprive them of billions of dollars in federal funding. The judge's preliminary injunction blocking the order will stay in place while the lawsuit moves through court.

It's the latest development in the fight between some cities that have decided to stand with their unauthorized immigrant communities, and authorities that enforce the nation's immigration laws.

Jersey City, home to an estimated 22,000 unauthorized immigrants, has taken steps to strengthen and codify its sanctuary status, openly defiant of immigration officials.

But even then, in many cases, Jersey City may still be powerless to protect undocumented immigrants.

The limits of sanctuary

Nearly 10 years after a woman from the Philippines settled in New Jersey, there was a knock on her door.

She had come to Jersey City in part because that's where immigrants have settled for more than 400 years. It's a city so synonymous with immigrants that, back in 1996, it declared itself a "sanctuary" for unauthorized US residents.

But on this January morning in 2016, the woman, who spoke with Business Insider on the condition of anonymity, was about to experience the limits of a place declaring itself a sanctuary city.

It was before sunrise. She had just fallen asleep, having come back recently from her job on the overnight shift.

The woman's sister let two men into their apartment. They were from US Immigration and Customs Enforcement, and a moment later they were in her bedroom.

"I thought it was just a dream," the woman told Business Insider.

The agents showed her a photo of herself. There was no denying it. She had been a permanent resident but lost that status after being convicted and serving time for possessing methamphetamines. So they took her away to the local ICE headquarters and then placed her in Hudson County jail, only a few miles from her home.

A city of immigrants takes a stand

Jersey City, in the shadow of the Statue of Liberty, is said to be the most culturally diverse city in America. Forty percent of its population is foreign-born. Its streets are home to immigrants from Italy, Cuba, the Philippines, Poland, India, Ireland, the Dominican Republic, Africa, the Middle East, and Asia.

The former Jersey City councilman was no stranger to voicing his opinion. Here, he protests outside the Goldman Sachs building in Jersey City as part of the 'Occupy NJ' movement.Andrew Burton/Getty ImagesJersey City has been a place for immigrants since before there was a United States, dating all the way back to when the Dutch settled the area in the 1600s. Tens of millions of immigrants passed through Ellis Island, which is within the city's borders, and many stuck around in Jersey City.

All this at least partly explains the actions of Jaime Vazquez in 1996, when the US was tightening its immigration policies, denying public assistance to immigrants and calling on government employees to report anyone they suspected of being in the country illegally. Vazquez, an outspoken, pro-immigrant councilman from Puerto Rico, wrote up a resolution to declare the city a "safe haven" for immigrants and to discourage city employees from reporting people suspected of violating immigration laws.

"It's un-American to have people living in fear because some social worker is going to report them to immigration. That's almost Gestapo-ish," Vazquez told the North Jersey newspaper The Record at the time. "Some people say that's an extreme comparison. OK, maybe. But the Nazis started somewhere."

By passing a resolution that declared the city would not help enforce federal immigration efforts, Jersey City had become a sanctuary city.

"The resolution embodies what the Statue of Liberty stands for: compassion, liberty and freedom," Vazquez, who died last year, told The Philadelphia Inquirer.

Then-Jersey City council president Tom DeGise was equally emphatic.

"We wanted to make a statement that, in our ethnically diverse city, we didn't want any city agency ferreting out illegal immigrants," he told The Christian Science Monitor at the time. "My job as a school teacher is to educate the children in front of me, not be in a position of saying, 'Are you an illegal immigrant?'"

But, as Jersey City's current government recently learned, symbolic gestures can do only so much, and now DeGise is on the other side.

The power of financial incentives

As Jersey City was first calling itself a sanctuary in 1996, nearby Hudson County Correctional Facility began housing immigration detainees under a so-called intergovernmental service agreement. As a contractor for the US Immigration and Naturalization Service, Hudson County, where Jersey City is located, began providing housing, safekeeping, subsistence, and other services for INS detainees in exchange for $77 per detainee per detained day.

DeGise has a different job now and a different perspective along with it. He's Hudson County's executive, and in this role he says he supports the county's efforts to help ICE detain unauthorized immigrants.

The 287(g) agreement essentially deputizes three corrections officers from Hudson County to function as immigration agents and allows them to interrogate, charge, and detain any immigrant already at the Hudson County jail.

When people are arrested for indictable offenses in Jersey City, their fingerprints are scanned and sent to the FBI, which then shares them with ICE. If their fingerprints come up in an ICE database as somebody who is wanted on suspicion of an immigration violation, then ICE can issue a detainer. Sanctuary status can't prevent that.

In June 2016, the county said it probably wouldn't renew its contract with ICE. "Barring overwhelming evidence presented by ICE of its law enforcement value or of the need for county, rather than ICE personnel to carry out this function, the 287(g) agreement will not be renewed," county spokesman Jim Kennelly told The Jersey Journal at the time.

"I was convinced that it's a very effective tool in trying to keep some bad guys out of our communities and off of our streets," DeGise told NJTV News in defense of the agreement.

DeGise declined Business Insider's requests for an interview, but in the 20 years since he backed Jersey City's sanctuary status, his change of rhetoric shows the limitations of sanctuary-city policy.

Even though Jersey City is a sanctuary city, its residents are at a higher risk of being detained and deported because ICE is embedded into the county's corrections system.

Amid concerns from advocates that the county would have to abide by new national guidelines introduced by Trump that allow ICE to prioritize just about every unauthorized immigrant for detention, the county issued a statement about a new policy it adopted that says it plans to continue following the priorities for detention it signed onto when it re-entered the agreement with ICE in July. According to those earlier standards, county correction would flag for detention only people who committed serious offenses.

In an email to Business Insider, Kennelly wrote, "The only reports sent to ICE by Hudson County Corrections are limited to serious offenses, laid out in a county policy put in place after the new Presidential administration took office."

The policy, however, also laid out guidelines for whom the county would screen and process — included on this list are people who have been arrested on suspicion of any misdemeanor that could result in at least three months of jail time.

"I'm a liberal Democrat, one who thinks that serious criminals, especially those who commit sexual assaults against women and children or engage in violent felonies don't deserve to remain in this country to prey on the very immigrants we cherish in Hudson County," DeGise said in a statement.

But critics say 287(g) is more of a public-relations program for ICE to say it is ridding the streets of dangerous immigrants, and they dispute the characterization — people arrested for minor offenses wind up in detention all the time, advocates say.

Immigrant advocates including Johanna Calle (left), Chia-Chia Wang (second from right), and Rosa Santana (right) are concerned about Hudson County's 287(g) agreement with ICE. Jennifer Brown Rosa Santana, a detainee-visitation program coordinator at First Friends of New Jersey and New York, tells Business Insider she has visited with detainees who are in jail for traffic violations. "We have heard of clients who called the police for a domestic violence dispute and then both parties were detained and ended up in immigration detention," she says.

Rev. Eugene P. Squeo, a longtime immigrant advocate who visits Hudson County detention center twice a week, says he often hears stories that fathers who support their wives and children sometimes spend months to years in detention for minor offenses.

Kennelly says ICE can detain whomever it wants, including people who have committed lesser crimes, and the county will house these detainees. Hudson County has no hand in choosing these detainees, he says. "With 287(g), we exercise very careful discretion in the choices of foreign-born individuals we report to ICE who are drawn from the arrested persons brought to our facility by local police," he writes.

Advocates say that, ultimately, the reason Hudson County kept its 287(g) contract with ICE is that the county didn't want to bite the hand that feeds it.

Chia-Chia Wang, the organizing and advocacy director at American Friends Service Committee who is also head of the group's Immigrant Rights Program, tells Business Insider that at a rate of $110 a day for each detainee, it behooves the county to identify more immigrants to be detained.

"The reason DeGise decided to renew the partnership with ICE was for the $20.5 million the county received in 2015 from the federal government for incarcerating immigrant detainees," Eugene G. Drayton, the president of the Hoboken Branch of the NAACP, wrote in an op-ed article for The Jersey Journal. "The county profits financially when, rather than being released, immigrants whose criminal charges have been dismissed or otherwise resolved, continue to be held on immigration matters."

At the end of March, nearly half — about 600 — of the almost 1,200 inmates at the jail were being held on ICE detainers, according to The Jersey Journal. While the jail's overall population has been dropping since January thanks to a new law that says only pretrial defendants deemed a danger to the public or to a witness may be detained, immigration advocates suspect this makes room for more immigrant detainees to occupy beds there.

Kennelly says, however, that the county's budget is huge — about a half-billion dollars — and, after expenses, the county nets only $8 million in income for housing ICE detainees. What's more, he says the county hasn't received any indication from ICE that Hudson County's jail would not be used if the county were to end its involvement with 287(g).

And while the bond rules are freeing up beds, he says the county's focus for the future is repositioning its jail as a regional center for drug treatment for inmates throughout the state and region.On the Monday evening following Trump’s first week in office, a diverse crowd of more than 2,000 people turned out for a pro-immigrant rally protesting Trump's executive orders on immigration. Courtesy of @fullmetalphotography

Meanwhile, Jersey City has a financial incentive to protect its 22,000 unauthorized immigrants.

In the New York metro area, which includes Jersey City, 36% of service jobs like making and serving food, working in offices and retail shops, and caring for children and the elderly are done by immigrants, both with documentation and without. And the concentration of immigrants in this area working blue-collar jobs like construction, truck driving, and factory work is even higher at 50% of the working class, CityLab reports.

Immigrants living in the US illegally aren't just working for small businesses, either. Immigration expert Harry Pachon once estimated that up to 10% of such immigrants run their own businesses. If true, that would suggest there are more than 2,000 unauthorized entrepreneurs in Jersey City.

A new city under a new administration

You can grab a fresh, hot samosa from one of the many restaurants lining Newark Avenue in the "Little India" section of Journal Square, and, after a quick bus ride up Central Avenue, wash it down with a cafe con leche from one of the Latin American bakeries in The Heights.

A street vendor in The Heights serves up fresh tacos and empanadas. Walter Hickey / BI Jersey City is also changing, with a waterfront rapidly becoming home to hipsters and finance workers priced out of New York neighborhoods like Williamsburg in Brooklyn.

"A lot of diverse folks live in proximity to each other, and they call them neighbors and friends and family," Jersey City Council President Rolando R. Lavarro tells Business Insider.

But the new administration has brought new fears to those subject to deportation.

"Sanctuary jurisdictions across the United States willfully violate federal law in an attempt to shield aliens from removal from the United States," Trump said in his executive order on immigration. "These jurisdictions have caused immeasurable harm to the American people and to the very fabric of our republic."

Trump's executive order to withhold federal grant money from sanctuary jurisdictions was reiterated by Sessions, the attorney general, who specified that Department of Justice grants could be at risk. Just last year, Jersey City received a grant of almost $1.9 million from the DOJ to support the hiring of 15 new police officers.

Threats to federal grants in sanctuary cities have been met with support by numerous conservative politicians, including New Jersey's governor, Chris Christie.

"Elected officials can't be allowed to pick and choose the laws they wish to comply with," Christie said during his call-in radio show. "And if they say they're not going to change, I can guarantee them something: Donald Trump is going to take away federal funding if you don't comply with the law."

But Jersey City decided to fight back. It has attempted to fortify its sanctuary status into an official law.

"I think it took [Jersey City] a little while to realize that, while in name you might be a 'sanctuary city,' in real practice you need to put a bit more than just a sentiment in there to actually do something," says Johanna Calle, the program coordinator at the New Jersey Alliance for Immigrant Justice.

Jersey City's sanctuary policy bars local police from helping ICE detain immigrants. Immigrations and Customs Enforcement handout via Associated Press In February, the city codified its official status as a sanctuary city into law.

Fulop's order also bars city agents from assisting in civil immigration-enforcement operations; requesting information about anyone's immigration status unless it's required by state or federal law, regulation, directive, or court order; or allowing federal immigration officers access to municipal facilities or databases without a warrant.

"In today's climate, despite threats, it's just a strong statement from Jersey City saying that we won't be bullied and we won't be mistreated and we're going to stand by the values that are important to us," Fulop said at the executive-order signing.

The real value in sanctuary-city policy

Lavarro, the Jersey City council president, says Jersey City has never aided ICE before. But by codifying its sanctuary-city status, the city is officially forbidding its police force from helping ICE.

Jersey City Mayor Steven Fulop signs an executive order declaring the city a "sanctuary" for immigrants. Jennifer Brown Fulop tells Business Insider that making Jersey City a sanctuary city was imperative because he wanted to ensure there was a sense of community in which people felt comfortable they could rely on city resources, which Trump's executive order threatens.

Jersey City's director of public safety, James Shea, tells Business insider there is no question the city has seen instances in which fear of deportation has hindered law enforcement.

"The big challenge in policing under our system of law isn't just apprehension — it's conviction," Shea says. "And that requires cooperation from the community in the form of witnesses, canvassing, sharing their video cameras with us from their homes or businesses. It requires a whole team effort from the community. Anything that helps the community feel comfortable making that effort works for us."

Hopes for the future

After she was picked up by ICE, the woman from the Philippines spent 11 months in the Hudson County jail until a judge declared she'd most likely be persecuted if deported. She won a "withholding of removal," essentially meaning she can stay in the US and apply for a job.

More than 2,000 people in Jersey City stood united for immigrants following Trump's election.Courtesy of @fullmetalphotography"When I came here, I had my pockets full of hopes, because living in the Philippines is really hard," she said. The woman is transgender, and the Philippines are not known for being accepting of LGBT people.

She says she's been clean of drugs for five years and wants to stay in the US. She says the US needs immigrants as much as immigrants need this county.

"I want to see this country be united," she says. "I want this country to still have immigrants because immigrants built this country, and I want this country to remain diverse. I want us to be more united because when we're united we're stronger, and we should not just let one person decide for the lives of the many."