Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President Donald Trump’s Justice Department's nationwide sanctuary city crackdown has spurred the states that are most affected to take radically different approaches on the issue.

The varied responses have created a patchwork of state and local laws that immigration advocates say ultimately confuse, and, in some cases, endanger undocumented immigrants.

According to the Pew Research Center, nearly half of the approximately 11 million undocumented immigrants living in the U.S. last year resided in three states: California, with 2.35 million; Texas, with 1.65 million; and Florida, with 850,000.

And yet, each of those three states are dealing with the problem differently.

A vehicle drives into the Otay Mesa detention center in San Diego, California on June 9, 2017. Elliot Spagat / AP file

California

The Golden State has taken specific action to counter the new rules put in place by Attorney Jeff Sessions that strip cities of millions of dollars in future federal grant money if they don't help federal agents deport suspected undocumented immigrants held in local jails.

The state budget signed by Democratic Gov. Jerry Brown over the summer included nearly $50 million over three years to provide free legal advice to immigrants in deportation proceedings. The budget also includes measures to block spending that would help grow the size of immigrant detention centers in the state.

Just last week, Brown also approved a “sanctuary state” law that essentially shields the 2.35 million illegal immigrants living in the state from the Trump administration's new rules by limiting, and in some cases prohibiting, cooperation between local law enforcement officials and federal immigration authorities. There are exceptions for people who committed certain offenses.

"Some states are really looking to push the boundaries of what they can and cannot do as it relates to immigration law generally," said Josh Breisblatt, a senior policy analyst at the American Immigration Council, a nonprofit group advocating for immigrants' rights.

That push, however, risks prompting the ire of the federal government. California’s newly enacted law, for example, might lead to a legal battle between the Justice Department and the state.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"We are spending every day we can trying to find the best way forward," White House Press Secretary Sarah Huckabee Sanders said at a press briefing on Thursday when asked whether the administration would make efforts to block the new California law. "I hope Californians will push back on their governor's irresponsible decision."

Sessions has been far more outspoken on the matter. During a speech last month to law enforcement officials in Oregon, he railed against sanctuary cities, claiming they "endanger us all" by doing "far greater damage than many understand."

The attorney general has repeatedly claimed that cracking down on sanctuary policies helps protect residents from drug traffickers, smugglers and sexual predators, and during his speech in Oregon, he referred to an undocumented immigrant who had allegedly committed a rape to make his case.

Hundreds of protesters line the balconies of the state Capitol rotunda in Austin on May 29, 2017, the last day of the legislative session, to protest Senate Bill 4. legislation already passed by Texas Gov. Greg Abbott that compels local police to enforce federal immigration law. Ricardo Brazziell / Austin American-Statesman via AP

Texas

Texas, on the other hand, has gone even further than the White House in its crack down on its own sanctuary cities

Republican Gov. Greg Abbott signed in May a tough anti-sanctuary cities law, known as SB 4, that would allow for local officials to be fined up to $25,000 a day or to be removed from office for not complying with federal immigration detention and enforcement measures. Under the Texas law, local officials could also be charged with misdemeanor crimes for not complying with federal detention requests.

The measure, designed to put an end to the sanctuary policies of blue Texas cities like Austin, was blocked from taking full effect by a federal court in August.

"These are the two extremes," said Muzaffar Chishti, the director of the New York office of the Migration Policy Institute, a nonpartisan immigration think tank, referring to Texas and California. "But they help contribute to what is…essentially just a nationwide patchwork of laws when it comes to immigration."

Attorney General Jeff Sessions speaks on crime in sanctuary cities on August 16, 2017 in Miami. Cristobal Herrera / EPA file

Florida

Florida, meanwhile, is stuck in the middle.

The Republican-controlled state House passed a bill in April that would have banned sanctuary cities and, like the Texas law, would have imposed severe financial penalties on local officials who did not comply with federal immigration orders. But the bill has not been taken up in the state Senate.

But in the absence of a statewide policy, cities began putting their own measures in place when it came to sanctuary for undocumented immigrants.

In Miami, officials have complied with federal immigration measures and detention requests.

Following the White House’s threatened crack down earlier this year, Miami Mayor Carlos Gimenez, a Republican who's been in office since 2011, ordered Miami-Dade County officials to honor federal requests — a policy reversal from 2013. Miami is the only large U.S. city known to have made such a reversal. Gimenez has suggested he did so because of concerns about losing funding.

That decision earned the city the plaudits of Sessions, who visited in August to tout its cooperation.

But mayors of other cities in the Sunshine State, including Tallahassee, have hit back at the Justice Department and have vowed to not cooperate with federal immigration authorities.

Chishti, of the Migration Policy Institute’s New York Office, explained that approach has the potential to be even more problematic for undocumented immigrants.

"In the absence of consensus, when there is no state directive, the local jurisdiction gets a lot of power," Chishti explained. "If you’re an undocumented immigrant (in Florida), your life is now hugely dependent on where you live. It can come down to a few miles."