MIAMI — The city of South Miami and a coalition of immigrant advocates sued Florida Gov. Ron DeSantis on Tuesday over a new law that forces local law enforcement agencies to cooperate with federal immigration officials.

Activists representing farmworkers, Haitian immigrants and asylum seekers warned the new law banning "sanctuary" policies is spreading fear at a time when President Donald Trump is announcing sweeps being conducted by U.S. Immigration and Customs Enforcement.

The lawsuit filed by lawyers with the Southern Poverty Law Center argues the new legislation will erode trust in law enforcement and lead to racial profiling. It says brown and black people will be subject to harassment by law enforcement because they might be perceived as foreigners.

Mandating cooperation with ICE could be dangerous during hurricane season when residents are asked to heed local government orders of evacuation, SPLC attorney Mich Gonzalez said at a news conference.

In the city of South Miami, more than half of the people are Hispanic or Latino, mostly of Cuban descent, according to U.S. Census estimates.

"For us, this is aimed at keeping the lines of communication opened between all communities and South Miami Police Department," said South Miami Commissioner Robert Welsh. "We are worried."

DeSantis signed the bill into law last month.

The complaint says the law violates the U.S. Constitution's supremacy clause, which renders state laws invalid if they conflict with federal ones. It also says the legislation goes against the 14th Amendment's due process clause because it detains immigrants past their release date without a warrant.

The complaint states the law was drafted by anti-immigrant organizations, which the SPLC has listed among its hate groups.

It cites remarks made at press conferences, including one in which bill supporter Amapola Hansberger stood with Republican state lawmakers Sen. Joe Gruters and Rep. Cord Byrd and spoke about immigrants who are in the country illegally, saying "they will kill you." Hansberger, a Nicaraguan native, heads an organization named Legal Immigrants For America, which the SPLC has also described as anti-Muslim and anti-gay.

"The law is rooted in hate because it is based on legislation from anti-immigrant hate groups recruited for the legislators to turn their white supremacist agenda into state law," Gonzalez said at a press conference Tuesday. "The state of Florida has no business or authority forcing local governments and police to do ICE's job."

The governor's office didn't immediately respond to a request for comment.

The lawsuit also says ICE can wrongfully ensnare U.S. citizens. A report by the American Civil Liberties Union of Florida says that in two years ICE requested to hold 420 people who were later identified as U.S. citizens in Miami-Dade County's jail records.

The new law prohibits local governments from enacting polices that protect immigrants in the country illegally from deportation. It requires law enforcement officers to honor ICE detainers for immigrants in the country illegally who are arrested or convicted of a crime. It exempts crime victims and witnesses.

Advocates said the law would put immigrants on deportation proceedings for offenses as minor as driving with an expired license. Some victims of domestic abuse, rape and human trafficking won't report the crimes out of fear of being deported, the lawsuit says.

DeSantis has a close relationship with President Donald Trump, who made illegal immigration a top priority. Trump helped DeSantis win the GOP primary last year and campaigned for DeSantis in the general election. DeSantis pushed the Legislature to pass the bill. Gruters, who also chairs the Republican Party of Florida, sponsored the bill and repeatedly argued it was simply about following the rule of law.