Mitch McConnell has developed an unlikely reputation as a master tactician in Congress, despite his evident lack of charm. The disagreeable nature of the Kentucky senator’s wooden personality is, in fact, one of the few things that President Donald Trump and Barack Obama appear to agree on. “Some folks still don’t think I spend enough time with Congress. ‘Why don’t you get a drink with Mitch McConnell?’ they ask,” Obama once joked. “Really? Why don’t you get a drink with Mitch McConnell?” Trump has reportedly complained that it’s impossible to make small talk or have any kind of relationship with the testudinal lawmaker. Still, McConnell has been devastatingly effective at his job, leading the Republican Party to sweeping electoral victories in 2010 and successfully derailing the nomination of Merrick Garland to the Supreme Court.

Since Trump took office, however, McConnell has found himself with neither a foil nor a partner in the White House, undermining his legislative agenda and imperiling his carefully crafted legacy in the Senate. Those frustrations came to a head Tuesday, as the Senate majority leader grappled with dueling disappointments. First, he was forced to cancel a vote on the Graham-Cassidy health-care bill, which would have block-granted Obamacare and Medicaid to the states, all but guaranteeing that the G.O.P. will not be able to fulfill its promise to repeal and replace the Affordable Care Act this year.

Hours later, McConnell’s longtime ally Senator Bob Corker announced that he would not seek re-election in 2018, the latest blow to a Republican establishment already experiencing an exodus. His departure is expected to give far-right candidates their best opening yet in Tennessee, where a host of Trumpian upstarts could jump into the race to challenge the party’s status quo.

And McConnell has reason to worry: Tuesday night, the G.O.P. elite stumbled again when the Steve Bannon-backed theocrat Roy Moore defeated incumbent Senator Luther Strange in Alabama’s Republican Senate primary, despite the more than $9 million a PAC associated with McConnell spent on Strange. In a preview of primary battles to come, Bannon and Breitbart News promoted the campaign as a referendum on McConnell’s leadership in what amounted to a proxy battle for the party’s soul. With Moore now likely headed to the Senate, the majority leader will lose a reliable vote in Strange for an untested, Trumpian hellraiser.

The trifecta of setbacks portends a rough 2018. The G.O.P.’s inability to coalesce around a repeal bill not only suggests that McConnell could struggle to pass tax reform, but also makes protecting incumbents from primary challengers all the more difficult. After seven years of promising to kill Obamacare, the party’s inability to deliver provides ascendant populists with the ammo they need to declare war on Washington. And with Corker’s retirement, McConnell’s fight just got bigger. Even if McConnell manages to shore up support for his preferred candidates in the Tennessee primary, history shows that midterm elections are never kind to the party in power. With the G.O.P. in the midst of an ideological schism, McConnell’s faction could be headed for a reckoning.

The tide is turning at the same time that McConnell is losing support with voters and with the president. A poll conducted last month pegged McConnell’s approval rating in his home state of Kentucky at 18 percent. Trump, who briefly paused his public feud with the majority leader to get his legislative agenda back on track, has reportedly taken to mocking McConnell, making fun of his body language, criticizing him as “weak” in front of conservative activists, and blaming him for the Senate’s failure to repeal Obamacare.

McConnell’s colleagues are still behind him, for now. “The whole health-care thing right now was sort of inspired by [Lindsey] Graham and [Bill] Cassidy, and the president, who kept it alive. I don’t think Mitch has much ownership other than to try to see if there’s a path forward,” Senator John Thune, the third-ranking Republican in the Senate, told Politico. Senator Cory Gardner similarly defended McConnell: “What happens today in Alabama with Luther Strange has nothing to do with Mitch McConnell. It has everything to do with Alabama.” One longtime McConnell adviser told Axios, “No question the road will get tougher before it gets easier, but McConnell does better in adversity. He won’t spend any time wringing his hands. He’ll be focused on tax reform like nothing happened last night.”