The fate of the Republican drive to repeal and replace Obamacare — and of the millions of Americans who could be left uninsured if it succeeds — could come down to a complex and obscure Senate rule.

That rule will determine what provisions Republicans can include in the bill, how much of Obamacare they can repeal, and perhaps whether the most conservative GOP senators will vote for it. It could be the roadblock to a policy that conservatives see as their biggest demand before they support a bill they have serious reservations about.

The most anti-Obamacare senators want to undo the law's insurance regulations as much as they can, and they are rallying around a proposal by Sen. Ted Cruz (R-TX) that would give them a win on that front. Under the proposal, if insurance companies sold a health plan that complied with Obamacare's rules, they would be allowed to sell other plans that did not.

That amendment might be essential to a Republican grand bargain on health care. If conservatives get a win on regulations, they might be more flexible about keeping some of the health care law's taxes on the wealthy. If some of the taxes are kept, then Senate leaders can spend more money on provisions, like Medicaid and financial aid for private coverage, that moderates are focused on. It's still likely to result in a bill that scales back federal support for insurance coverage and overhauls Medicaid while cutting taxes for the health care industry — but if any plan can pass the Senate, it's likely to look something like that.

But the first domino to fall in such a scenario would be a conservative win on insurance regulations. The Cruz amendment will first have to survive the so-called "Byrd Rule," which is supposed to limit the bill to policies that directly affect federal revenue and spending. If the proposal doesn't comply with the Senate's rules, an ensuing fight could pit conservatives against moderates and institutionalists — and could edge Senate Majority Leader Mitch McConnell (R-KY) closer to completely eliminating the legislative filibuster, a move with far bigger implications than health care policy.

It's a predicament seven years in the making, since Republicans started swearing to repeal Obamacare as soon as they took control of the government, and it is one that the GOP has courted from the start of this year's repeal effort.

With a slim majority in the Senate, the party chose to use "budget reconciliation" — a process that allows a bill to pass with only 50 votes but comes with restrictions that make it less than ideal for complex policymaking — to pass their plan.

The result is that the fate of the whole enterprise could now rest with the Senate's parliamentarian. Conservatives and senior senators have been meeting with that arbiter of the chamber's rulebook in recent days to figure out what they can include in the bill.

Obamacare, in other words, may live or die on the Byrd Rule — a 20-year-old quirk in the Senate's rules that most Americans have never heard of.

The Senate is using budget reconciliation to pass its health care bill

Republicans swept into power this year and pledged to immediately get to work on their long-promised goal of repealing Obamacare. But they had one problem: They held only 52 seats in the Senate; under the usual legislative process, where a bill can be filibustered and held up if 40 senators oppose it, Democrats could block any repeal plan.

The Senate got rid of the filibuster for Supreme Court nominations to confirm Neil Gorsuch to the Supreme Court. But Senate traditionalists refused to nix the legislative filibuster, and so Republicans turned to "budget reconciliation" — a process designed for spending and revenue bills that requires only 50 votes to move a bill — to repeal and replace the health care law.

Reconciliation was designed to make sure the Senate could more easily pass bills dealing with the federal budget, particularly if Congress wanted to reduce the deficit, without the threat of a filibuster from the minority party. (The process begins with a congressional resolution instructing committees in the House and the Senate to draw up legislation that saves the federal government a set amount of money.) So the special privileges under reconciliation come with conditions.

Those conditions, meant to make sure reconciliation is actually used for bills that affect the budget, are the next obstacle the GOP's repeal-and-replace effort will have to overcome.

But those restrictions are a hurdle to any plan to repeal and replace Obamacare. Overhauling the health insurance system, as the law did, includes all sorts of provisions that have nothing to do with federal spending or revenue. Republicans have already tacitly conceded that they can't fully repeal the law because of these limitations. But some of Obamacare's parts that they are most eager to roll back, such as its insurance regulations, could also be tricky to undo under reconciliation's rules.

The Byrd Rule of budget reconciliation will determine what Republicans can actually do in their health care plan

The restrictions of reconciliation will set the parameters of the Senate's health care debate — and have proven difficult for lawmakers to navigate and limited what ideas they can consider.

The Senate, for example, needs to come up with a bill that will save the federal government as much money, or more, as the House version.

That's going to be a problem for the health care bill — senators want to bolster the financial assistance for lower-income people buying private insurance and soften some of the House bill's Medicaid cuts, which will cost more money. If they increase spending, they must offset it somewhere else, perhaps by delaying the repeal of Obamacare's taxes or cutting Medicaid more in the future. Right now, the Republican plan is coalescing between some combination of the two.

They also have to make sure that the bill actually saves money. There was a brief panic that the House bill didn't achieve that goal, which also would have put the whole enterprise at risk because the bill wouldn't comply with the Senate's rules.

The mother of all conditions is known as the Byrd Rule. The rule came about in the 1980s, after Sen. Robert Byrd of West Virginia, a Democrat, grew frustrated with reconciliation. His colleagues were using it to advance all sorts of policies, not just those related to spending and revenue. So he introduced his standard for what can be included in a reconciliation bill, which has since been enshrined in federal law.

A bill being considered under reconciliation has to check every box of the six-part Byrd Rule. If it fails any one of those tests, it must be stripped out.

The provision must change federal spending or revenue.

If the bill does not meet the budget resolution's instructions to reduce the federal deficit, any provision that results in either increased spending or decreased revenue is removed until it does meet those targets.

The provision must only affect policies that fall under the jurisdiction of the specific committees that were instructed in the budget resolution.

The provision's effect on spending or revenues must be more than incidental to its policy impact.

The provision cannot increase the federal deficit at some point in the future, beyond the typical 10-year "budget window" that is used to evaluate legislation.

The provision cannot change Social Security.

Most of the time, if part of a bill fails that six-part test, that provision is removed and the rest of the legislation is allowed to advance.

But some violations can be considered "fatal" — meaning that the entire bill would need 60 votes to pass. Those could include any provisions that violate No. 3, on the issue of jurisdiction, I'm told. Congress is said to have controversially exempted itself from part of the health care bill because the bill would otherwise have been risk of such a fatal Byrd Rule violation. Member benefits, like their health insurance, fall under a different committee's jurisdiction, one that wasn't included in the budget resolution. Without the exemption, the bill could have lost its 50-vote privileges in the Senate.

The American Health Care Act has been shaped by those restrictions since the beginning. The original version of the House bill, which failed before House Speaker Paul Ryan could bring it to the floor in late March, didn't touch most of Obamacare's regulations. Senate aides told me this was because of the Byrd Rule.

It was only after House conservatives revolted, helping to sink the bill the first time, that the compromise of allowing states to waive those rules emerged.

The entire bill will be subject to what's known as a "Byrd bath." Republican and Democratic staff will go through the legislation with Senate parliamentarian Elizabeth MacDonough and make their arguments about which provisions violate the Byrd Rule and which ones don't.

"Because some of these questions will be matters of gray, the question is interpretation of the Byrd Rule given past precedent," Sarah Binder, who studies Senate procedure at George Washington University, told me. "Both parties will try to convince her of their position for or against a Byrd Rule violation."

The "Byrd bath" isn't a public event: We'll know its outcome by what's included in the final legislation put forward by McConnell — and some of the most contentious issues could be litigated on the Senate floor.

Ted Cruz's crucial amendment could live or die on the Byrd Rule

The Byrd Rule most immediately threatens the Cruz proposal that is designed to give conservatives a win on Obamacare's insurance regulations — a compromise that might be essential for the bill to get 50 votes.

Cruz's amendment would allow health plans to sell non-Obamacare-compliant plans as long as they sell compliant plans as well. That could risk segmenting the market and sending it into a death spiral: Healthy people would flock to the skimpier plans while sick people would buy Obamacare coverage, driving up costs for the latter. The health care law's financial assistance would mitigate premiums increases for the people who receive them — though that depends on an effectively unlimited federal commitment to subsidizing skyrocketing premiums.

Regardless, it could be a political winner. Senate leadership is taking the proposal seriously. But the Byrd Rule is a big problem.

Democrats and other outside experts have said changing insurance regulations in any way might not be permissible under reconciliation, either because they don't have a budget impact or because any impact would be incidental (1 and 4 on the Byrd list).

Such provisions, they argue, are intended to alter how the insurance market works, not to reduce federal spending or increase revenue. So even if there might be a budgetary impact, it would be an afterthought. That is not their purpose.

"I have argued for a long time, having gone through a number of Byrd baths in my lifetime, if it's a regulatory change at the state level, or private industry level, it's hard to make the case that that will have a direct federal budgetary consequence," Bill Hoagland, a former Senate Budget Republican staffer who now works at the Bipartisan Policy Center, told me.

Senate Republicans are currently negotiating this issue. Cruz, his ally Sen. Mike Lee of Utah, and Sen. Lamar Alexander (R-TN), one of the most senior Republicans working on the health care bill, met with the Senate parliamentarian this week. McConnell asked the Congressional Budget Office to evaluate the Republican bill both with Cruz's policy and without it, Axios reported over the weekend.

The CBO's findings could be critical. The bigger the budgetary difference, the easier it would be to justify the Cruz amendment under the Byrd Rule — outside experts told me the same thing about previous iterations of the GOP's plans to loosen Obamacare's insurance rules.

"It'll come down unfortunately to CBO, when they put out the cost estimate on that bill," Hoagland said. "Is it big or is it small?"

Cruz has arguably been making a Byrd case for his amendment in recent days, by describing it as direct taxpayer subsidization of people's high medical costs.

"If those with seriously illnesses are going to be subsidized, and there is widespread agreement in Congress that they are going to be subsidized, I think [it's] far better for that to happen from direct tax revenue rather than forcing a bunch of other people to pay much higher premiums," Cruz told me last week.

He seemed confident that his amendment would comply with the standard. It's conceivable that by sending the Obamacare markets into a quasi-death spiral, the policy will significantly drive up the costs to the federal government through bigger subsidies — which is, funnily enough, a good thing for conservatives as far as the Byrd Rule is concerned.

"I think under the plain text of the Budget Act of 1974, it satisfies the Byrd test," Cruz said.

The Byrd Rule could also determine whether the legislation would function at all if it were actually implemented.

Like the House bill, the Senate's version wants to repeal Obamacare's individual mandate, but unlike the House bill, it doesn't replace it with anything to compel people to buy insurance. The House would have required people to stay insured or else face a surcharge when they signed up again, but the Senate bill includes no corresponding provision.

Without some kind of mandate replacement, as Vox's Sarah Kliff wrote, the insurance markets under the Republican plan could go into a death spiral.

So why was it left out initially? Several experts have speculated it's because of the Byrd Rule. The provision arguably doesn't directly affect federal spending or revenue.

The House provision "seemed to me like a strong possibility of a Byrd Rule violation," Binder told me. "It seemed pure policy — and thus 'extraneous' under the Byrd rule."

Other contentious issues — defunding Planned Parenthood and placing abortion-related restrictions on the Obamacare subsidies being kept in the Senate bill — are politically potent and potentially at risk under the Byrd Rule.

Conservatives have pushed to defund the women's health organization and prevent the subsidies from going to health plans that cover abortions. Several experts, as well as Democrats, have contended those provisions aren't allowed under the Byrd Rule.

Some Senate conservatives want to overrule the parliamentarian if needed. But senior Republicans aren't on board.

If conservatives can't change Obamacare's insurance rules, it could put the whole repeal-and-replace effort in jeopardy. House conservatives made these a make-or-break issue for them, refusing to back the bill until they won some rollback of the regulations and restrictions on the subsidies. Senate conservatives have now done the same.

But the core problem remains. Any such changes might not be permissible under the Byrd Rule. The Senate is allowed to waive the Byrd Rule, but it requires 60 votes to do so. No Democrat is going to help Senate Republicans push their Obamacare repeal bill through. Senators have asked 57 times for a Byrd Rule waiver; only eight of those have been approved, according to the Congressional Research Service.

Conservatives have one more card to play: They have already begun to argue that the Senate can actually overrule the parliamentarian if they want.

Under the Byrd Rule, all determinations are technically made by the presiding officer in the Senate. On a bill as momentous as Obamacare repeal, that could be Vice President Mike Pence. But historically, the presiding officer has deferred to the parliamentarian's judgment. So if MacDonough said waiving Obamacare's regulations didn't comply with the Byrd Rule, that policy would traditionally be stripped out.

Some Senate conservatives have said that's unacceptable. On something as important to them as Obamacare repeal, they want to gut as much of the law as possible no matter what the parliamentarian says. They'd argue for Pence to ignore MacDonough and declare that these provisions are acceptable under reconciliation.

"The parliamentarian merely advises, the vice president decides," Cruz told Politico in May. "Mike Pence is the ultimate decider."

For now, Cruz says he thinks his amendment compiles with the Byrd Rule. But if MacDonough disagrees, and conservatives push to circumvent the parliamentarian, they're going to run into a big problem: Their senior colleagues oppose it. Other Republicans argue that overruling the parliamentarian is tantamount to gutting the rules that make reconciliation special.

If the Senate overruled MacDonough and allowed these provisions to sneak through under reconciliation, then that sets the precedent for future Senates to do the same thing. Any policy could be brought up for a vote under reconciliation.

"If something like that were to happen, it would set a new precedent for the Senate that would allow anybody to bring up any bill on any other bill at any other time, even under reconciliation," Sen. Mike Enzi (R-WY) told me. "You would have a never-ending list of votes any time reconciliation came up."

It would be a devastating blow to the historical 60-vote threshold for advancing most bills in the Senate and an unacceptable step for senators who pride themselves on tradition and deliberation.

"Rulings aren't supposed to be left to the discretion of who sits in the presiding officer's chair. That would sort of be parliamentary mayhem," GWU's Binder said. "That would be the ultimate nuclear option."