A controversial increase in penalties for protesters who block highways was stripped out of a Minnesota public safety budget measure early Monday morning.

The move came as a surprise to Rep. Nick Zerwas, R-Elk River, who thought Gov. Mark Dayton was open to the proposal until he learned about 1 a.m. Monday that it had become a casualty of negotiations. In exchange for pulling the protest language, a prohibition on driver’s licenses for undocumented immigrants remains in the bill, said Zerwas, who was chief sponsor of the highway protest bill.

“There was a little bit of politics at the Capitol in the middle of the night,” he said. “Obviously, I’m very frustrated with that turn of events.”

Zerwas is optimistic about reviving his protest penalty proposal early in the 2018 session.

The measure was inspired by the highway and airport protests that arose after police shot two black men in separate Minnesota instances last year.

The driver’s license provision has been a major sticking point in the past.

Dayton says the language barring him from giving undocumented immigrants licenses is unneeded because he is already banned from enacting the new licenses. Republican fear without language barring him from administrative licenses action, the governor may do it anyway.

A spokesman for the governor said Dayton and his cabinet remained actively involved in budget negotiations, but the governor planned to consider the total budget passed by the Legislature before making any final determinations.

Discussion on the public safety bill on the House floor Monday was overwhelmingly dominated by debate over the driver’s license provision. There was not a peep, in fact, about the removal of the protest language.

Democrats called the driver’s license provision cruel and mean-spirited, and repeatedly argued that by stopping undocumented immigrants from getting driver’s licenses, it would stop people from educating themselves enough to pass a driver’s exam and get insurance.

“Good public policy is not being accomplished in this bill. … This provision is one that will guarantee that we will be less safe in our state,” said Rep. Carlos Mariani, DFL-St. Paul. Other Democrats also argued that it was ironic the provision was included in a public safety bill.

Rep. Rod Hamilton, the lone Republican to speak against the provision, described meeting a woman in Worthington, Minn., who was repeatedly raped, but was afraid to go to authorities because she was undocumented.

Hamilton, of Mountain Lake, pleaded with this colleagues to think deeply about immigrants: “It’s bigger than a driver’s license.”

Rep. Eric Lucero, R-Dayton, said it was “categorically false” that the bill was racist, as some Democrats implied in their House speeches.

“Voting green on this bill does not smack of racism. What it does smack of is process. The rule of law,” Lucero said.

“It’s basically a good bill with a little bit of controversy and most of the controversy out,” said the House bill’s author, Rep. Tony Cornish, R-Vernon Center, as discussion wrapped up.

Debate in the Senate largely mimicked that in the House, with Democrats saying the provision would threaten safety and Republicans replying that they were attempting to enforce laws equally.

“I personally embrace immigration. … But in this society of ours, likewise, we all must embrace and encourage the rule of law as well,” said Sen. Warren Limmer, R – Maple Grove, who chairs the judiciary committee.

“Last I checked the Senate judiciary (committee) also had the name public safety in it,” said Sen. Ron Latz, the ranking Democratic member on the committee.

The public safety and judiciary budget includes $167 million in new spending — less than Dayton has wanted but roughly twice what the GOP-led Legislature wanted to spend. The total budget for courts, prisons, license bureau and other law enforcement activity is about $2.3 billion.

It includes new funding for court operations, but not as much as the governor recommended. It also mandates an analysis of what it would take to reopen and operate the prison near Appleton, if the state ever undertakes a major expansion in prison beds.

The House approved the funding measure Monday afternoon by a vote of 98-36, with Hamilton the lone Republican vote against it. The Senate approved it 46-21.

It was just one of many budget measures lawmakers had to approve on Monday with time running out to met the Legislature’s constitutionally mandated midnight deadline.

Rachel E. Stassen-Berger contributed to this report.