After months embroiled in emotional testimony, protests, controversy and national news coverage, Sen. Joe Gruters’ version of a bill to ban “sanctuary cities” in Florida passed 22-18 in the Senate Friday. Sen. Anitere Flores of Miami was the only Republican to vote against the bill.

The vote came after two days of impassioned floor debate by Democrats and Republicans alike, telling personal stories of their own family’s immigration or the stories of their constituents. The Senate gallery, filled with immigrant families, activists and children, nodded along for hours and cried out after the vote was called.

The Senate and the House, which passed its version of the bill Wednesday, still need to iron out differences in their proposals, particularly on a tougher stance taken by the House when it comes to penalties.

The House’s bill builds in a rule that local government employees or elected officials who permit sanctuary-city policies may be suspended or removed from office. The proposal also includes fines of up to $5,000 for each day that a sanctuary-city policy is in place. Identical bills must pass both chambers before hitting the governor’s desk. In this case, differences will have to be negotiated and “bounced back” between the House and Senate until they come to an agreement on a piece of legislation.

While the House has tried to pass a similar ban the last four years, and it died in the Senate the last time around. But Gov. Ron DeSantis has made “sanctuary cities” a key talking point from the start of his campaign to swearing in, an element Gruters says was key.

“That’s why this is moving forward,” Gruters said earlier this week. “It has opened up some doors that weren’t previously available.”

The bill creates rules relating to federal immigration enforcement by prohibiting “sanctuary” policies and requiring state and local law enforcement to comply with U.S. Immigration and Customs Enforcement.

Under this bill, local law enforcement would be required to honor federal law enforcement’s request for an “immigration detainer,” meaning a request that another law enforcement agency detain a person based on probable cause to believe that the person is a “removable alien” under federal immigration law. The bill would essentially make the “request” a requirement.

The House and Senate still need to iron out differences in their proposals, particularly on a tougher stance taken by the House when it comes to penalties.

Florida is part of a recent trend of states pushing such policies. Arkansas recently banned “sanctuary cities,” and Republicans in Michigan, Montana and North Carolina are pushing similar bans.

The House passed its version Wednesday after two days of debate.

“I’m just glad to be the catalyst to help this happen,” Gruters told reporters earlier this week.

Gruters’ bill passed with an amendment that would give DeSantis the authority to “initiate judicial proceedings in the name of the state” against local or state officials who do not cooperate with enforcing immigration laws.

Since its origin, Gruters’ effort has been embroiled in controversy.

In March 27, the News Service of Florida published portions of emails between Gruters and hard-line immigration groups that helped shape portions of the bill and the bill’s staff analysis

Then at a press conference in April, he borrowed a Trump tactic of speaking alongside “angel parents” whose children were killed by undocumented immigrants. The Southern Poverty Law Center then posted a Twitter thread noting two speakers at the news conference belonged to hard-line anti-immigrant groups.

DeSantis — a vocal supporter of President Donald Trump who aired a campaign ad in which he helped his young daughter build a tiny border wall — has also used the examples of people killed by undocumented immigrants to make his point.

“We do not want to be in a situation where we have more angel parents,” DeSantis said during a March news conference. “I hope that the Legislature moves quickly this session to pass legislation.”

Then in the middle of the bill hearing process, a report by the American Civil Liberties Union showed that federal immigration authorities have asked Miami-Dade to hold at county jails hundreds of people who are listed as U.S. citizens. The group cited data provided in a lawsuit filed by a U.S. citizen, Garland Creedle, who was wrongly held for deportation after spending a night in a Miami-Dade jail in March 2017.

Amid the news items on Gruters and the bill, arguments erupted into protests at the Capitol, sit-ins at lawmakers’ district offices and even an ACLU-issued travel warning for travelers and non-citizens to stay away from Florida.

The American Business and Immigration Coalition, backed by Miami billionaire and healthcare magnate Mike Fernandez, says the bill will hurt the economy by $3.5 billion in GDP. More than 120 business leaders signed a letter by the coalition urging lawmakers to stop the legislation.

Agriculture Commissioner Nikki Fried, the state’s top Democrat, also spoke out against the bill, calling it “divisive rhetoric … pushed by the president.”

Miami Sen. José Javier Rodríguez has been one of the most outspoken opponents of the bill, and filed nearly three dozen amendments over the past few weeks to address some of his concerns.

In a surprising vote Thursday, one of his amendments was adopted — a first for Democrats fighting against the bills in both chambers. The amendment exempts the Department of Children and Families or employees of the department from being compelled to comply with an ICE request.

Gruters said he doesn’t think the amendment “makes a difference.”

Some of Rodriguez’s other amendments would have built in more protections for other groups like crime witnesses, victims of sex crimes and victims of human trafficking.

He said protecting witnesses was key.

He made mention of a recent incident in Pembroke Pines, where it was discovered Thursday that a youth pastor is accused of raping a teenager for a year and threatened to report her family’s illegal immigration status if she reported the crime.

“Law enforcement is telling us that the incidence of reporting of crimes has gone down. Among immigrants, under-reporting of crime is a bigger problem,” Rodriguez said.

His amendment failed, but two others with language to protect witnesses passed: One by Sen. Manny Diaz, R-Miami and one by Sen. Jason Pizzo, D-Miami Beach.

Sen. Annette Taddeo, another vocal critic of the bill, filed an amendment to exempt people who have temporary protected status or are recipients of Deferred Action for Childhood Arrivals (DACA).

In a speech on the floor Friday, she said the bill is “mean” and ignores moments in America’s history of turning people away and treating minorities poorly.

“Our history of ugly moments when it comes to immigration is something we should learn from,” she said. “I ask you to not make this a moment we will regret ... We are better than this.”

Rodriguez said his Republican colleagues don’t have a willingness to move on the bill, citing DeSantis’ support.

“The reason he’s in the governor’s office is because he ran an anti-immigrant campaign just like Trump did,” Rodríguez said. “Demonizing immigrants is core to their primary electoral strategy.”

Republicans argued on the floor that immigration policy was not for the state to make, and that the bill simply addresses a problem facing Florida.

“How do we solve this problem? There is one way,” Sen. David Simmons said. “We do not have individuals who have committed crimes be given a free pass.”

Simmons suggested the Legislature take up proposals in the future that would help immigrants attain legal status, like a bill to allow more work permits or drivers licenses.

“None of us condone a system that is out of control,” the Altamonte Springs Republican said.

Sen. Tom Lee, however, was less certain on his vote. He said listening to debate on sanctuary cities bill was like switching between Fox News and MSNBC. He added that he was “really on the fence” about whether the bill would solve the problem.

“I’ve never been more confused,” the Thonotosassa Republican and two-time Senate President said. “I felt like we let ideology and. partisanship take over the plain words of a piece of legislation. We couldn’t be more far apart.”

Lee said he’s hopeful the language gets tightened up since he thought Gruters made sense in his statements. The bill language, however, was less clear, he said.

“In the end, I didn’t have a yellow button so I chose to trust Senator Gruters’ interpretation,” he said.

After the vote was called, immigrant families and advocates left the chamber in tears.

Amy-Patricia Morales, an FSU student from Miami, said she has shown up to the Capitol over the past few months to protest the bill in honor of her father, who was deported when she was 9 years old.

She said she thinks senators did not do enough to address the trauma families face when someone is deported.

“When you’re 9, how do you put it into simple terms? You can’t,” she said. “For me, it’s being 9 and coming home from school to a parent missing.”

Nataly Chalco Lopez, a Florida State University student and DACA recipient from Peru, talked about her fears for her undocumented parents. Lopez, who is from Broward County, said her parents will likely never come to visit her at school or even attend her graduation as to avoid driving a far distance without a driver’s license.

She said lawmakers see people like her parents as criminals.

“They believe that what they’re doing isn’t wrong. They’re in denial of the fact that they are racist,” she said. “They have convinced themselves that the way that they think is correct ... they’re too far gone.”