President Trump has promised to crack down on so-called sanctuary cities, signing an executive order in January 2017 that moved to strip federal grant money from towns that “harbor” illegal immigrants.

A federal judge permanently blocked it in November 2017, saying the Trump administration lacks the authority to impose new conditions on spending that has already been approved by Congress.

But the Justice Department has taken legal action against California, the first “sanctuary state.” Its designation means the nation’s most populous state will limit just how much local law enforcement will cooperate with federal immigration authorities.

What are sanctuary cities?

While the exact specifications can vary, sanctuary city policies overall limit how much local law enforcement officials can comply with federal immigration authorities.

San Francisco, for example, passed an ordinance in 1989 that prohibits city employees, funds or resources from assisting Immigration and Customs Enforcement (ICE) in enforcing federal immigration law unless it’s required by state or federal law.

It also passed an ordinance that limits when law enforcement officials can give ICE notice that an immigrant has been released from a local jail and prohibits law enforcement officials from cooperating with detainer requests from ICE.

Berkeley, near San Francisco, is reportedly the original sanctuary city. It passed a resolution in 1971 that protected sailors who wanted to resist the Vietnam War.

It’s difficult to nail down a concrete number of just how many cities are considered to be a sanctuary for illegal immigrants – some cities have an ordinance or policy in place; others do not.

What about states?

Aside from cities, five states – California, Oregon, Connecticut, Rhode Island and Vermont – have enacted laws that limit how much police can contribute assistance to federal immigration agents, according to The New York Times.

California Gov. Jerry Brown signed the law that went into effect this year designating California as a “sanctuary state.” The law, in part, bars police from asking people about their immigration status or participating in some federal immigration enforcement activities.

How are they viewed?

The debate about sanctuary cities intensified in July 2015 when Kate Steinle, 32, was killed as she strolled along the San Francisco waterfront with her father. Steinle was shot by a man with a criminal record who had slipped into the U.S. multiple times illegally.

Attorney General Jeff Sessions addressed a roomful of federal prosecutors and law enforcement officials last year and criticized cities, like Philadelphia, that are “giving sanctuary” to criminals. He asked them to “reconsider the harm they are doing to their residents.”

And in suing California, Sessions told Fox News that it’s “federal law [that] determines immigration policy.”

“The state of California is not entitled to block that activity,” he said. “Somebody needs to stand up and say ‘no, you’ve gone too far, you cannot do this, this is not reasonable.’ It’s radical, really.”

Not every city in The Golden State is on board with the state’s sanctuary policies, however. The Los Alamitos Council voted to opt out of the sanctuary policies, and other municipalities are reportedly exploring similar options.

But the Immigrant Legal Resource Center (ILRC) argues that local law enforcement jurisdictions do not have a “legal obligation to assist with civil immigration enforcement, which is the responsibility of the federal government.”

“A local decision to offer resources to federal immigration enforcement authorities is completely voluntary,” the legal organization said in a 2016 report.

The Associated Press contributed to this report.