A federal judge has blocked a 2019 state law that bans so-called "sanctuary cities," saying portions of the law are unconstitutional and amount to ratifying racist viewpoints.

Judge Beth Bloom's 110-page ruling out of the Southern District in Miami Tuesday says the state can't prohibit local governments from adopting policies that offer undocumented immigrants protection and it can't require law enforcement use their "best efforts" to enforce federal immigration law.

Still, the law enacted with the passage of Senate Bill 168 was not entirely struck down. Bloom let stand the provision that allows local law enforcement personnel to hold undocumented immigrants past their release date so that federal authorities can pick them up.

The ruling was largely seen, however, as a repudiation of the anti-immigrant fervor that Gov. Ron DeSantis ran on in 2018 that was also promulgated by then-President Donald Trump.

"This ruling is a victory for immigrants across the state of Florida," said a news release from the Southern Poverty Law Center, which spearheaded the challenge to the law. "This law was clearly developed to encourage racial profiling, civil rights violations, isolation of immigrant communities, and unjust deportations. It did more harm for the causes of public safety than good."

The Governor's office, however, vowed an appeal. Spokeswoman Taryn Fenske said the two parts that were struck down were "narrow" provisions of the law.

"Yet again a federal trial court judge partially enjoins a plainly constitutional state statute," Fenske wrote in a statement, saying that the opinion was based on a "hodge-podge of factors."

"We disagree with the judge's ruling and expect to win on appeal," she wrote.

Sanctuary cities are defined as those municipal governments that limit cooperation with federal immigration agents. Some organizations count 38 of them in Florida. But only West Palm Beach got a mention when then-Attorney General Jeff Sessions in 2017 put out a list of cities that had adopted "sanctuary policies." Those cities were sent letters warning them they were not in compliance with federal statutes regarding information sharing with federal immigration authorities.

Nevertheless, Bloom's ruling hits hard against the close relationship between the bill's sponsor, Sen. Joe Gruters and two groups, Floridians for Immigration Enforcement (FLIMEN), and the Federation for American Immigration Reform (FAIR).

"… Allowing anti-immigrant hate groups that overtly promote xenophobic, nationalist, racist ideologies to be intimately involved in a bill's legislative process is a significant departure from procedural norms," Bloom wrote. "The Court has found that FLIMEN and FAIR were both intimately involved in SB 168's development and had direct access to and influence over the legislators involved with the bill. This involvement strongly suggests that the Legislature enacted SB 168 to promote and ratify the racist views of these advocacy groups."

Gruters, also the chairman of the state Republican Party, said he's looking forward to the ruling being overturned.

"This bill was always about public safety and ensuring that illegal aliens are not treated better than Americans when it comes to the judicial system," Gruters texted in response to an inquiry. "The judge was misled as that opinion is not based on facts."

The ruling also details how the law banning sanctuary cities was having a chilling effect on people seeking needed services, such as public schooling, police assistance for domestic violence, health care and social services, for fear of being targeted.

The law center was also joined by plaintiffs including the Miami-based Community Justice Project and the University of Miami School of Law's Immigration Clinic, acting on behalf of the Florida Immigrant CoalitionFarmworker Association of FloridaWeCount!Americans for Immigrant JusticeHope Community CenterQLatinxWestminster Presbyterian United ChurchThe Guatemalan-Maya Center, Inc., Family Action Network Movement and the City of South Miami.

"Plaintiffs demonstrated that their members have suffered injuries from racial and ethnic profiling, unlawful or unfounded traffic stops, and illegal detentions by law enforcement agencies that are attempting to comply with the requirements of the law," Bloom wrote.