TALLAHASSEE, Fla. — All law enforcement agencies in Florida will have to cooperate with federal immigration authorities under a bill signed by Gov. Ron DeSantis on Friday during a ceremony that often felt like a campaign rally for him and President Donald Trump.

The bill prohibits local governments from enacting "sanctuary" polices that protect undocumented immigrants from deportation. Advocates say the bill is politically motivated and pointed out that Florida does not have any sanctuary cities. It will require law enforcement to honor U.S. Immigration and Customs Enforcement detainers for undocumented immigrants who are arrested or convicted of a crime. It exempts crime victims and witnesses.

"Sanctuary cities basically create law-free zones where people can come to our state illegally and our country illegally, commit criminal offenses and then just walk right out the door and continue to do it," DeSantis said. "In Florida, that will not happen."

On Saturday, President Trump praised the Florida governor for the move and criticized leaders in other states who "don't have the courage to do so," tagging Fox News in the tweet.

....More and more states want to do this but their governors and leaders don’t have the courage to do so. The politics will soon mandate, however, because people from California, & all over the land, are demanding that Sanctuary Cities be GONE. No illegals, Drugs or Trafficking! — Donald J. Trump (@realDonaldTrump) June 16, 2019

The bill was signed in the Okaloosa County Commission's meeting room with an overflow crowd dotted with red "Make America Great Again" hats. Okaloosa, in the western Panhandle, is one of the state's most conservative counties. The crowd cheered wildly in support of the bill and equally as loud at the mention of Trump.

Trump, who has made illegal immigration a top priority, helped DeSantis win the GOP primary last year and campaigned for DeSantis in the general election. Republican U.S. Rep. Matt Gaetz, another close Trump ally and who campaigned across the state for DeSantis, also spoke at the ceremony.

"It felt more like a political rally than an actual bill signing," said Democratic state Rep. Anna Eskamani, who watched the event on her cellphone. She questioned why it was held in Okaloosa, which doesn't have a large immigrant population. "It seemed more like, 'I want politically supportive people in the room,' versus an environment where advocates would be protesting outside, advocates would be inside protesting, immigrant communities would be heard."

DeSantis also introduced Kiyan Michael of Jacksonville, whose son Brandon was struck and killed by a driver who had been deported twice and illegally returned to the country again.

"We're blessed to have the best president, we believe, since Ronald Reagan," she said as the crowd roared. "Our fight is not over. Our immigration laws have to be reformed, they have to be changed, so you all don't become us."

The bill caused protests among immigrants and their advocates at the Capitol when it was before the Legislature. They feared it would encourage law enforcement profiling, force people to be deported for minor offenses like traffic infractions, and discourage crime victims and witnesses from coming forward. Opponents also argued that holding people based on an immigration detainer was unconstitutional.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.

At the bill signing, he said the bill was about "making sure we protect American citizens from the very bad, criminal illegal aliens that are here committing the worst crimes imaginable. This is not about illegal aliens who are here trying to provide for their families."

Eskamani said the bill will affect immigrants far beyond those who commit violent crimes, and said comments like the one Gruters made could increase anti-immigrant resentment and possibly spur hate crimes.

"When you perpetuate this type of rhetoric, when you escalate situations for political banter, people will get hurt. They'll get caught in the crossfire, quite literally," she said.