On July 25, Senate Majority Leader Mitch McConnell (R-KY) was able to pull off a minor political miracle when he convinced 50 members of his caucus—many of them openly skeptical—to back a measure to begin debate on an unknown bill to overhaul Obamacare.

The Kentucky Republican lost only two Senators on that vote. And though it allowed the process to go forward, it by no means guaranteed final success. In two days time, McConnell would need to hold a vote again, this time to actually pass a bill.

The next morning, President Donald Trump did what he tends to do when the rest of the country drinks coffee. He took to Twitter. And in slightly less than 140 characters, he attacked one of the two Republican holdouts, Sen. Lisa Murkowski of Alaska.

Both Murkowski's office and Republican Senate aides insist that the tweet was ephemeral, the type of oddly-aggressive political broadside that everyone has come to expect from the president’s social media accounts. But it certainly didn’t help McConnell do his job. On Thursday night, McConnell held that second vote. He and his lieutenants had been privately trying to woo Murkowski by discussing the inclusion of reforms that would help her home state. But before significant progress could be made, Trump struck again.

Interior Secretary Ryan Zinke placed a call to the Senator—undoubtedly at the behest of the White House—letting her know that her position on health care was putting her state in the crosshairs with the Trump administration. After that point, GOP leadership largely wrote off the possibility of winning Murkowski's support. They went into the evening knowing they couldn’t lose a single additional member. Ultimately, they came up one vote short.

The president’s treatment of Murkowski was a microcosm of a blunt, ultimately doomed legislative strategy on health care. Trump, congressional aides and administration officials say, was quick to threaten Republicans who defected or looked like potential defections, while offering little to flip no votes or boost those who stayed in line.

The White House was “all vinegar and no honey, and that only works if you’re feared,” a senior administration official conceded to The Daily Beast. “Obviously [Senate GOP defectors] fear their voters more than Trump.”

Officials spoke on the condition of anonymity in order to discuss legislative strategy more freely.

Murkowski wasn’t the only Senator to feel the Trump wrath. After returning to the Senate following a brain cancer diagnosis, Sen. John McCain (R-AZ) let it be known that he was unhappy with the process of passing health care and amenable to voting no. When McCain did end up voting to begin debate, Trump cheered him on Twitter. But his prior treatment of the Senator could best be described as abusive. During the campaign, Trump had questioned McCain’s heroism as a war prisoner and his political chops as a presidential candidate.

When it became evident that McCain might defect on the final vote, the White House had precious few cards to play. There had been no significant conversations between McCain and White House leading up to then. Vice President Mike Pence tried talking the Senator into voting yes. But in the wee hours of Friday, McCain walked into the chamber and thrust his thumb down, effectively killing Trump’s best chance for healthcare reform.

A “Competent” Trump Might’ve Been Helpful…

During the 2016 campaign, Trump pitched himself as the ultimately deal maker, uniquely able to pass legislation because of his innate understanding of human nature. More than six months into his time in office, he has scored no major legislative wins and his unfamiliarity with the people and ways of Washington is showing.

The healthcare debate is Exhibit A. The president chose a passive approach with regards to policy detail, often leaving the hardline-conservative House Freedom Caucus and the Tuesday Group, a bloc of more moderate Republicans, to huddle independently in an effort to hammer out a compromise.

“Trump's involvement in House process showed he didn't really help and maybe hurt,” a House Republican aide told The Daily Beast.

When Trump did engage, it often was with a lack of nuance or sophistication. He did little to bridge stark ideological divides among Republicans. And when he tried, he often complained that healthcare was something akin to whack-a-mole— to pick up votes among conservatives you had to alienate moderates, and vice versa. What he did do was push lawmakers with late night phone calls, White House visits, and the occasional public threat, to get to yes.

Ultimately, the House was able to pass a bill. And aides say Trump played a helpful role in those closing days.

But the all sticks no carrots approach had limitations as well. Some lawmakers scoffed at Trump’s non-subtle threats to encourage primary challengers to those who voted no. Others wondered why he didn’t try a more positive and proactive touch, including pledges of reelection assistance to lawmakers from states that he had won in 2016 and campaign-rally visits in the districts or states of wavering pols.

“Yes, a competent POTUS would have been heavily selling this and whipping his members,” the House Republican aide said. “But it failed because Senate Rs are all over the place and are looking out for Number 1 knowing they can't expect helpful back-up from [Trump] in their reelections.”

By the time the bill made its way to the Senate, an already disjointed White House effort to get healthcare passed grew worse with a number of crises, including a shakeup of the president's communications team. Last week, Trump hired New York investor and media personality Anthony Scaramucci as communications director, setting off a bizarre and extremely distracting chain of events that drew White House focus away from the Hill.

The resulting chaos was a symptom of the long-running melodrama engulfing the Trump White House—self-inflicted drama and crises that certainly didn’t help the White House craft a more concerted or effective pressure campaign on health care.

Fox News Has the President’s Back, As Always

As the Senate moved towards voting on its bill, Trump administration officials positioned the White House so that any blame coming from the party’s base would be directed at Republicans in Congress.

Trump questioned whether lawmakers had the courage to act and continuously reminded his Twitter followers that the Republican Party had promised repeal-and-replace for seven years.

“For years, even as a ‘civilian,’ I listened as Republicans pushed the Repeal and Replace of ObamaCare. Now they finally have their chance!” @realDonaldTrump tweeted on July 9.

It did not slip past conservatives on Capitol Hill that the Republican president chose to emphasize “they” instead of “we.” But by that point, many had concluded that Trump was operating off his own script. Behind the scenes, his team, including HHS Secretary Tom Price and CMS Director Seema Verma worked closely with McConnell’s office to craft Medicaid and individual market reforms to try to please hardliner conservatives and moderates alike. “They were super helpful on calling members and working members,” said a Senate GOP leadership aide.

But Trump himself seemed averse to the details. Often, he complicated his own team’s approach, such as when he’d discuss his desire to “let ObamaCare fail”—an implicit un-endorsement of the GOP leadership’s efforts to pass and sell their own replacement bill.

Despite it all, the party nearly pulled it off. Trump’s insistence that leadership keep trying to find ways through the impasse led them to make a variety of policy compromises that weakened their bill but kept it alive. By the end point, virtually no one in the conference was defending the proposal (known as “skinny repeal”) but almost all were willing to vote for it. Had McCain not had a change of heart, the House and Senate would be in conference now working out a bill that split their respective differences.

Trump certainly didn’t help his cause, said longtime GOP operative Steve Schmidt. Whether he bears the responsibility for tanking it is a harder debate. “What is also clear, is this was a policy ponzi scheme. There was no plan to repeal or replace,” said Schmidt. “The most amazing part of the story is they got 49 people to vote for something that no one had any idea what it would even do. That is not conservative, it is radical.”

At the White House, sources have told The Daily Beast that they believe the president and administration officials will ultimately be mostly shielded from any wrath the GOP base may have over healthcare’s failure. One of the benefits of being so actively removed from the process is that you can reject claims of responsibility should it fail. But, in addition to that, Trump enjoys the support of the influential conservative, right-wing news media and commentariat far more than McConnell or any of the “establishment Republicans” who often come under ridicule.

One White House official positively referenced, as an example, a Fox News segment that aired in late March—after the initial House version of Trumpcare tanked spectacularly following a heavy-handed, threat-filled push from the White House and the president himself. It was in that segment that host Jeanine Pirro called on House speaker Paul Ryan to quit his job.

“I want to be clear,’ Pirro stressed, “this is not on President Trump.”