MIAMI (CBSMiami/AP) -— A lawsuit was filed Tuesday over a new law that forces local law enforcement agencies to cooperate with federal immigration officials.

The lawsuit filed by lawyers with the Southern Poverty Law Center says the new law 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.

READ MORE: BSO Investigates Fatal Crash In Dania Involving Motorcyclist

DeSantis signed the bill into law last month to ban “sanctuary” polices.

“I stand as someone who was in the legislature in full support of this litigation and lawsuit,” said Orlando state Rep. Anna Eskamani. “We must do our part to defend democracy.”

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 U.S. Immigration and Customs Enforcement detainers for immigrants in the country illegally who are arrested or convicted of a crime.

It exempts crime victims and witnesses.

Opponents have said the law would cause people to be deported for minor offenses like traffic infractions.

READ MORE: Haiti's contributions to South Florida in full display at Haitian Heritage Month Art Exhibition

“Prior to this bill it has been our official policy that the police do their job,” said South Miami Mayor Phillip Stoddard. “The enforce traffic law. They enforce the criminal laws. Not federal immigration laws.”

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. Republican Sen. Joe Gruters, who also chairs the Republican Party of Florida, sponsored the bill and repeatedly argued it was simply about following the rule of law.

The lawsuit says some victims of domestic abuse, rape and human trafficking won’t report the crimes out of fear of being deported.

“When this bill was proposed and was cosponsored by folks, there are legislators who said ‘hey can we carve out exceptions for government entities that really have no business using best effort to work with ICE like the DCF, like schools?’ and every time they were shot down,” said Mich Gonzales from the South Poverty Law Center.

As for the city of South Miami, the mayor wants citizens to trust in their law enforcement.

“Our police department has worked so hard to develop a partnership with the citizens of South Miami,” said Mayor Stoddard. “A wonderful police chief, a great police program. We are always working on improving it, the trust. The bill takes us in the wrong direction.”

MORE NEWS: What we know about the victims of the Texas school shooting

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)