The Florida Senate approved legislation Friday that would require local officials to comply with federal immigration authorities, a major win for state GOP leaders who are seeking to enact stringent restrictions on “sanctuary cities.”

The 22-to-18 vote in favor of the bill came two days after the Florida House approved its version of the legislation. The two chambers will now try to reconcile their respective bills before the scheduled end of the legislative session next Friday.

The bills would mandate that local governments accept U.S. Immigration and Customs Enforcement requests — known as detainers — that local jails hold immigrants suspected of being in the country illegally until federal authorities can take them into custody.

Gov. Ron DeSantis, a Republican who took office in January, has made the legislation a top priority this year. Helen Ferré, a DeSantis spokeswoman, said the governor is eager to sign the measure into law.

“Governor DeSantis understands that sanctuary cities drive down the wages of Florida workers, erode the rule of law, are unfair to our legal immigrants and incentivize illegal immigration,” Ferré said.

While the definition of what “sanctuary city” means can vary, most analysts say Florida does not have any jurisdiction that matches — many sanctuary cities decline to provide information to federal immigration authorities or to turn over those who are arrested within their borders.

A coalition of civil rights groups, social justice advocates, farmers and business leaders had teamed up to try to block the legislation. That led to weeks of emotional debate in a state where 20 percent of residents are foreign-born.

Opponents say the House and Senate bills are drafted so broadly that Florida law enforcement officials would in effect become deputies in President Trump’s broader crackdown on immigrants in the country illegally. Opponents fear that heightened cooperation with ICE will increase racial profiling while undermining the state economy by eroding its workforce.

The Senate bill was sponsored by state Sen. Joe Gruters, the chairman of the Florida Republican Party. The final vote tally broke down largely along party lines, with one Republican joining all 17 Democrats in opposing the measure.

Before the final vote, many Democratic members pleaded with their GOP colleagues to shelve the legislation, arguing it was a mean-spirited attack on immigrant communities.

“You are putting a target on these individuals,” said state Sen. Perry E. Thurston Jr. (D). “Let’s not hide behind the illusion that we are going after criminals, because there is nothing in this legislation that prevents the profiling and targeting of undocumented individuals.”

Sen. David Simmons, a Republican, countered that he and his GOP colleagues were trying to adhere to the “rule of law.”

“This legislation is not intended to hurt anyone — it is to provide a mechanism to solve a significant problem that exists in this state today,” said Simmons, who noted there are about 775,000 immigrants living in Florida who are in the country illegally.

House and Senate leaders are expected to meet next week to reconcile the competing versions of the bill. The Senate bill is widely considered to be more moderate than the House version.

Under the House bill, state and local government agencies are also expected “to support federal immigration law.” The state could fine violators up to $5,000 per day.

The Senate bill does not mandate any fines, leaving it up to the state attorney general to enforce the law. The Senate bill also excludes the Florida Department of Children and Families, and senators amended the bill Thursday to add protections for undocumented immigrants who have witnessed crimes, according to CBS 4 in Miami.