“Repeal and replace Obamacare.” It’s a simple, clear, crisp campaign slogan.

Now that Republicans are set to assume unified control of government, they’re discovering it’s an incredibly complicated reality.

To repeal the bulk of Obamacare, the GOP will have to keep 218 House members and at least 50 senators — and majorities of relevant committees — together.

In the Republican camp alone, that includes stalwart free market conservatives, Trump loyalists, the pro-business party establishment, members from states that have benefited from Obamacare’s Medicaid expansion, old-timers who have been in Congress forever, and a fair number of members representing states or districts Hillary Clinton won. They’ll also need to satisfy President Trump, who will wield a veto pen at the end of the day.

Then to actually replace the law with their own full-blown plan, Republicans reportedly believe they will have to go through regular Senate order rather than the special reconciliation process — meaning they’ll need 60 votes. That means at least eight Senate Democrats in addition to all the factions described above would have to agree to enact a replacement.

And at every stage, many people and groups who don’t get an outright vote will weigh in. They include the GOP governors in states that have expanded Medicaid and might not be so eager to see that expansion rolled back. They include major health-related interest groups: The American Medical Association, for one, has already said repeal shouldn’t happen until a replacement is ready, and hospitals and the pharmaceutical industry will surely also weigh in.

There are also think tank wonks and activist groups, on both the right and the left, in groups like Americans for Prosperity and Families USA. And there are the guardians of Hill procedure — like the Congressional Budget Office, which will estimate how much Republican bills will cost and how many people would lose coverage, and the Senate parliamentarian, who will enforce the chamber’s rules about which provisions can be passed through the 51-vote reconciliation process.

Bringing enough people together in support of just one plan will be difficult. It’s no accident that health reform legislation ate up nine full months of President Obama’s first two years. So when you hear Trump say he wants it wrapped up quickly — “long to me would be weeks,” he told the New York Times Tuesday — keep in mind that that means all of the following will have to happen very quickly indeed.

Phase 1: Make 51 the magic number for repeal in the Senate (done)

The first thing Republicans had to do was make sure they can pass most of Obamacare repeal with just 51 Senate votes — that is, exempting it from the infamous filibuster, which can block nearly all legislation that doesn’t have the support of 60 senators.

For complex procedural reasons I explained at greater length here, the way the GOP actually went about doing this was by passing a budget resolution through both houses of Congress. That’s what the GOP did this week.

Though some Republicans are selling the budget resolution as an “Obamacare repeal resolution,” it does nothing of the kind. It doesn’t change law or policy in any way whatsoever.

Instead, the sole purpose of the budget resolution is to kick-start a special congressional process called budget reconciliation that will make one forthcoming bill immune to the filibuster. And since Republicans have 52 Senate seats and a House majority, that effectively ensures no Democratic support will be necessary for repeal. (Replacement is a different matter.)

Luckily for Republicans, the budget resolution itself was also immune to the filibuster — meaning it could pass with just 51 Senate votes, and it did so Thursday morning. The House of Representatives then passed a budget resolution with identical language Friday, making it go into effect (no presidential signature is needed).

This is the easy part, because nothing is actually happening to Obamacare yet. Still, a surprising amount of intra-Republican division has surfaced during the process. A group of GOP senators with very different ideological backgrounds publicly pushed to slow down the process. Meanwhile, in the House, members of the notoriously difficult-to-govern conservative Freedom Caucus have complained about the spending levels in the budget resolution and the language it contains. But the GOP did manage to remain united during this first phase.

Phase 2: Writing and passing the repeal bill (or, the bill that can’t be filibustered)

Now that the budget resolution has passed, though, things are about to get very complicated very quickly, as Congress starts to actually write the Obamacare repeal bill.

This is when they’ll have to settle two big questions — just how much of Obamacare do they really want repealed, and should this repeal bill (which can be passed with just 51 votes) include some elements of an Obamacare replacement too?

The process starts at the committee level. Already, things get confusing, because there’s no one committee in charge of health care policy in either chamber. In the Senate, the Finance Committee and the Health, Education, Labor, and Pensions (HELP) Committee will each draft its own version of repeal. In the House, the task will fall to the Ways and Means Committee and the Energy and Commerce Committee. (In 2009, Democrats gave the House Education and Labor Committee a role too, but this committee isn’t mentioned in this year’s budget resolution.)

So discussion and debate on what repeal should look like, exactly, will take place simultaneously in at least four committees. Each will have to decide on a starting plan to work off of (perhaps the plan Trump has promised he’ll release, or the plan Congress passed and President Obama vetoed last year). Then the representatives and senators sitting on each committee will propose various amendments, which the full committee will vote on.

In the Senate particularly, these committees are run by strong-willed chairs who expect to have a major role in shaping the process. They are Finance Committee Chair Orrin Hatch (R-UT), the longest-serving Republican senator, and HELP Committee Chair Lamar Alexander (R-TN), a widely respected former governor. Both are conservative, but neither is an ideologue — they’re pragmatists who will carefully consider how the changes they make will play out on the ground. Alexander in particular has already shown a willingness to buck GOP leaders’ Obamacare strategy in favor of laying out his own timeline.

At this stage of the process, the Congressional Budget Office will also weigh in. The CBO is Congress’s nonpartisan budget scorekeeper, and it will issue estimates on just how much the GOP repeal proposals will cost (or save) — and how many people they’d deprive of insurance. The office is particularly important in this situation because each committee has to submit a bill that will reduce the deficit, according to the budget resolution that sets up that expedited reconciliation process. So if CBO concludes the GOP’s bill would raise the deficit, that’s a big problem.

The committee members themselves will also make their voices heard — particularly in the Senate, where Republican majorities are narrow. Should Democrats remain united against repeal, the GOP can’t afford to lose a single Republican senator in each committee.

Those senators come from very different states, representing very different interests, with diverse ideological views. On the HELP committee, Republicans will have to wrangle the moderate Susan Collins (R-ME) and the libertarian Rand Paul (R-KY) into agreement on a plan. On Finance, they’ll need the support of purple staters like Dean Heller (R-NV) and Pat Toomey (R-PA).

And Sen. Bill Cassidy (R-LA), a physician representing a poor conservative state with many Obamacare beneficiaries, serves on both committees — but he’s sounded skeptical of a full repeal of the law, saying in early January that he wanted to get rid of its “penalties and mandates” but not necessarily “the other stuff.” Cassidy’s reticence illustrates a bigger dynamic here — Republicans are strongly committed to the slogan of “repealing Obamacare,” but there seems to be a whole lot of disagreement on how much of it should actually be abolished.

Eventually, each committee will each have to vote to report out a bill. After that comes the merger process — the multiple committee final products will be merged into one House bill and one Senate bill, in a process guided by each chamber’s leadership and key committee chairs.

Furthermore, since the Senate’s rules only allow it to consider certain types of bills under that filibuster-proof budget reconciliation process — everything in the bill must have a significant impact on federal spending or revenues — the bill that emerges here will have to win the approval of the Senate parliamentarian, a nonpartisan officer in charge of enforcing those rules.

Then, at long last, each bill will proceed to the full House and full Senate, where a great many amendments will likely be considered and voted on. In the House, 218 votes would be needed for passage — and if no Democrats sign on, that means at least some members of the famously truculent Freedom Caucus would have to deem the bill conservative enough for their tastes. In the Senate, the support of at least 50 senators would be needed to produce a tie that could be broken by Vice President Mike Pence.

Still, that’s not the end of the story — since the House and Senate will likely end up with different final products, a conference committee would be convened with representatives from both chambers to iron out the differences.

Whatever the conference committee settles on would then again have to pass the full House and Senate — and it would then be presented for President Trump’s signature (should he choose to give it). Whew.

Phase 3: Writing and passing the “replace” bill (or, the bill that can be filibustered)

But that may not be the end of the legislative process — because Republicans, including President-elect Trump, have repeatedly promised that Obamacare would not only be repealed but would also be replaced with something better.

Republicans aren’t anywhere close to a consensus on what this replacement would entail, policy-wise. They’re even undecided on the timing and the legislative strategy for trying to pass a replacement.

One obstacle here is the set of pesky Senate rules about just what the reconciliation process can be used for. Depending on how it’s written, a full-blown health reform bill would likely contain many provisions that don’t have a specific budgetary impact. “Allowing insurance companies to sell across state lines, for instance, probably can’t fly under reconciliation,” says Sarah Binder, a congressional procedure expert at the Brookings Institution. Instead, policy changes like that would likely have to be considered under normal Senate order, which means they could be filibustered.

The upshot is that a comprehensive replace bill could well need 60 Senate votes, not just 51, to advance — which means the GOP would have to win over at least eight Senate Democrats. That seems immensely challenging. However, the New York Times’s Maggie Haberman and Robert Pear report that House Speaker Paul Ryan’s aides currently believe the Senate will end up having to try to pass an ordinary bill alongside or shortly after the reconciliation effort to enact truly comprehensive health reform.

If there’s a second piece of legislation (or a few more pieces of legislation) involved in the effort, then the bulk of the process outlined above — debates and amendments in four committees, Congressional Budget Office scoring, a merger of the committees’ various bills, a floor debate and amendments, passage in both chambers, conference committee, passage again in both chambers, and the president’s signature — would all have to be done again. But the threshold at the end for success in the Senate would be 60 votes, because of that filibuster.

There are five Democratic senators representing deep red states that Trump won by double digits: Joe Manchin of West Virginia, Heidi Heitkamp of North Dakota, Joe Donnelly of Indiana, Claire McCaskill of Missouri, and Jon Tester of Montana. All five are up for reelection in 2018, so they might be eager to work with Trump on high-profile issues to prove their centrist bona fides. Still, most of them have shown no love for the GOP’s Obamacare replacement ideas. And even if they are won over, Republicans would need to pick off at least three more Democrats — and it’s harder to imagine whom they might be.

A replacement effort under the regular rules, therefore, seems likely to stall. If it does, there may be a round of chatter from the right about whether the filibuster should be eliminated. But many key Republican senators seem distinctly uninterested in taking such a drastic measure.

In the end, Obamacare repeal and replacement will be an incredibly complex and likely an incredibly lengthy task. There’s no guarantee of success at the end for Republicans. But there are many points indeed at which things could go horribly awry.

Watch: Repealing Obamacare could change millions of lives