COLUMBUS, Ohio—Just before the clock struck midnight during a marathon legislative session Thursday, Ohio lawmakers approved a pay raise for themselves and other elected officials, tacking it onto a bill to increase benefits for the widows and children of fallen first responders.

Senate Bill 296 now heads to Gov. John Kasich, who called the measure “this grubby pay bill” and is likely to veto it. However, the bill passed both the Ohio House and Senate by wider margins than the three-fifths majority needed to override Kasich’s veto, should it come to that.

Under the bill, legislators’ salaries would rise incrementally in the next decade from their current base pay of $60,584 to $73,167 by 2028. Additional stipends for legislative leaders and committee chairs would also go up.

Other state and local elected officials, from the governor down to county coroners, would receive pay boosts of varying amounts.

Ohio lawmakers’ base salary is the eighth-highest in the nation, according to a 2018 National Conference of State Legislatures analysis. The estimated median household income in Ohio was $52,407 in 2017, per the U.S. Census Bureau.

Proponents of the move, though, note that Ohio lawmakers’ compensation hasn’t gone up since 2008.

House Speaker Ryan Smith, a Gallia County Republican, told reporters Wednesday that he hoped the governor would not veto the legislation.

“We’re talking about modest increases for local government officials who work hard every day, and everybody else,” Smith said. “It’s not outlandish by any means.”

But state Rep. Michele Lepore-Hagan, a Youngstown Democrat, denounced adding the proposed pay hike to legislation originally designed to help the families of fallen police officers and firefighters.

“It’s disgusting to use families of law enforcement officers killed in the line of duty as a vehicle for pay raises,” she said.

State Sen. Frank LaRose, a Copley Township Republican and secretary of state-elect who introduced the original bill, removed himself as a sponsor, tweeting that he opposes the “11th hour maneuver” to raise elected officials’ pay. LaRose did not cast a vote on the bill.

The Ohio House passed SB 296 by a 68-20 vote on Thursday afternoon, about a day after the pay raises were added to the bill by a House committee. The Ohio Senate voted 26-5 around midnight Friday to approve the House’s changes.

The bill was approved with an emergency clause, meaning it would take effect immediately instead of 90 days after it becomes law. Ohio lawmakers’ pay raises aren’t allowed to take effect until the following session begins, so SB 296 would have to take effect this year for the pay raises to kick in for next year’s Ohio General Assembly.