RALPH NORTHAM, Virginia’s new Democratic governor, soundly beat his Republican rival, Ed Gillespie, by harnessing antipathy for Donald Trump. Virginia was the only Southern state that the president lost to Hillary Clinton in 2016. But Mr Northam's landslide win in November was also due to his promise to bring 300,000 uninsured Virginians under the umbrella of Medicaid, a federal health-care programme for the poor and disabled.

The governor's young administration now has a problem: there is no consensus in the Republican-controlled legislature for his chief policy goal. Under the Affordable Care Act, the federal government would pay 90% of the $2bn a year cost of expanding Medicaid; the state would raise the remaining 10% by taxing hospitals.

The low-key paediatric neurologist has moved closer in the first three months of his term to implementing this initiative than his predecessor, Terry McAuliffe, also a Democrat, did in four years. But Mr Northam has yet to close the deal—even with an unexpected boost from Republican legislators who have dropped their opposition to it. The continuing resistance of other Republicans means that Mr Northam’s aspirations could be destroyed by Republican fratricide.

Republican-versus-Republican disagreement over the programme threatens legislative inaction on a bigger piece of public business: the two-year, $115bn Virginia budget, in which the programme is included. On March 10th the impasse forced the General Assembly to close its winter session in Richmond without adopting the budget. Mr Northam has called lawmakers back to have another go at both the budget and health care beginning on April 11th.

So will the programme pass? In the House of Delegates, it probably will. There, in November, voters opposed to Mr Trump reduced a two-to-one Republican majority to two seats. That has forced the Republican Party to adopt a gentler stance on Medicaid expansion, in the hope that it will improve the party’s chances of retaining control of the chamber in the 2019 elections.

Led by the new House speaker, Kirkland Cox, a retired high-school teacher from suburban Richmond, nearly half of what remains of the Republican caucus endorsed the Medicaid scheme on the condition that it include a work-for-benefits requirement similar to that recently adopted by such red states as Kentucky and Arkansas. More than 35 states have taken handouts from the federal government to expand Medicaid to comply with Obamacare, which the Trump administration has failed to kill but is, nonetheless, working to weaken.

House Republicans are wagering that their stance will give them sufficient cover with conservative party activists for whom resistance to Medicaid expansion is a sine qua non, while appealing to more moderate swing voters who consider the Republican Party needlessly hard-hearted on health care.

But Senate Republicans, most of whom are snug in safe districts, have a different concern: thwarting nomination challenges from the right. Such threats will be magnified by a little-noticed federal court decision, if it stands. In January, a US District Court judge in Waynesboro, in the state’s rural Republican heartland, threw out a law that leaves it to an incumbent to select the process for deciding a contested nomination. Incumbents typically prefer primaries, which allow them to harness votes beyond the party base. The ruling would require party activists to decide the nominating system. Given the Republican Party’s continuing lurch to the right, that would probably mean nominations would be settled by convention. And it is an insider’s game that tends to attract the most rigid—and anti-incumbent—ideologues. Such fears have compelled Senate Republicans to reject Medicaid expansion altogether.

There is no sign an agreement can be reached soon. Indeed, the actual deadline is June 30th, the last day of the current spending cycle. Unless a budget is place by then, Virginia will have no plan or clear authority for spending public funds.

All this leaves Mr Northam in something of a quandary over the work-for-benefits requirement introduced by Republicans. Though he opposes such measures, the fact that the House is moving towards Medicaid expansion represents a huge shift from the McAuliffe years, when the mere mention of the programme sparked truculence from Republicans. And in the Senate, there are several Republicans considered woo-able. Some are from rural areas—read: Trump country—where concentrations of people without health insurance are among the highest in the state. Others are from Trump-hostile suburban districts that fell to Mr Northam last year.

If the new governor does not prevail on Medicaid expansion this year, he may have better chance after next year’s polls, when all 100 House seats and 40 Senate seats are up for election—especially if they become mini-referenda on Mr Trump that Republicans cannot win.