ASSOCIATED PRESS In this photo taken Wednesday, Dec. 19, 2018 North Carolina Gov. Roy Cooper listens during an interview at the Governor's mansion in Raleigh, N.C. (AP Photo/Gerry Broome)

RALEIGH, N.C. (AP) — Republicans dominating a half-empty North Carolina House chamber have voted to override Democratic Gov. Roy Cooper’s veto of the state’s two-year budget.

The unexpected vote Wednesday morning came without dozens of Democrats on the House floor. Republican leaders tried for months to locate enough votes to meet the threshold for an override, largely through winning over enough Democrats. They finally got what they wanted because Democrats opposed to the budget weren’t at their seats.

The override isn’t complete — the Senate still must hold a vote on the issue, but Republicans would only need one Democrat there to secure victory.

Wednesday’s vote came as lawmakers have focused this week on redrawing legislative maps following a court ruling striking down dozens of districts due to extreme partisan bias.