After months of grueling debate and discord over expanding Medicaid in Virginia, Republicans got their way.

The GOP-led House and Senate approved a budget that not only lacks funding to expand Medicaid but also requires General Assembly approval in the future—an attempt to block Democratic Gov. Terry McAuliffe from implementing the Affordable Care Act component through an executive order.

McAuliffe, who must sign any budget for it to take effect, vows he isn’t giving up, saying he will “take the actions [he deems] necessary, but this fight is far from over.”

“Virginians deserve better than representatives who put narrow ideology ahead of what is best for our families, economy and budget,” the governor said in a statement.

McAuliffe has just a few days to alter the budget, and any alterations have to be approved by both chambers of the General Assembly.

One amendment in the General Assembly-passed budget also nullifies the authority of the Medicaid Innovation and Reform Commission—a bipartisan, bicameral committee Republicans established as a way to get Democrats to vote for former Gov. Bob McDonnell’s transportation bill last year—to expand Medicaid.

The sudden resignation last week of Democratic State Sen. Phil Puckett cleared the path for Republican control of both chambers and, ultimately, the passing of a budget, 21-18. Democratic State Sen. Lynwood Lewis, who won his seat by 11 votes this year in a special election, sided with Republicans on the vote—much to the chagrin of his Democratic colleagues.

“Within the Senate Republican caucus, it took some extreme patience,” said Sen. Tommy Norment, once again the majority leader after Puckett’s resignation. “It took some ability to try to evolve a consensus. We had some very divergent opinions. We had three senators who had been very deliberately and passionately advocating Marketplace Virginia as an alternative, Medicaid expansion, and then I had 16 other senators who were equally passionate in resisting the expansion of Marketplace Virginia or Medicaid.”

“To try to bring those two extremes together was the most challenging experience I have had in 23 years in the Senate of Virginia,” Norment continued. “Ultimately, both perspectives came to appreciate that while there was a difference in opinions about Marketplace Virginia and Medicaid expansion, the one overriding consideration was that Virginia must have a budget, and we needed a budget now.”

The new budget balances much lower-than-expected revenues—about $1.5 billion lower than expected over the next two years—by dipping deeply into the state’s Rainy Day Fund and holding off on raises for teachers and state employees, among other things.

If McAuliffe makes any amendments that lead to Medicaid expansion, Republicans have vowed to block him.

“I am strongly encouraging the governor to sign the budget without any substantial amendments and without inserting Obamacare’s Medicaid expansion,” said House Majority Leader Kirk Cox. “If he includes Medicaid expansion, the House will reject that amendment. That will cause even further delays in adopting the budget.”