Less than 18 months after being elected speaker, Mr. Ryan has emerged from the defeat of the health care bill badly damaged, retaining a grip on the job but left to confront the realities of his failure — imperiling the odd-couple partnership that was supposed to sustain a new era of conservative government under unified Republican rule.
So far, to the surprise of some close to Mr. Trump, the president has remained upbeat on Mr. Ryan, a frequent punching bag during the 2016 campaign and an ideological mismatch whose instincts informed the molding and selling of the health bill far more than the president’s own.
But after a humiliating defeat, which many Trump advisers are eager to pin on the speaker, Mr. Ryan is now tasked with defending not just his leadership abilities but his very brand of conservatism in a party fitfully searching for a coherent policy identity that can deliver tangible victories.
In this first fight, Mr. Ryan’s more orthodox right-leaning vision was co-opted only halfheartedly by Mr. Trump, who has few fixed political beliefs, in service of a bill the president never well understood, even as he laid on the superlatives in praising it. Now, Mr. Ryan must tug a ruptured conference toward future agenda items, like overhauling the tax code, made all the more difficult by this initial failure.
“Oh, I’m sure he’ll get blamed,” Representative Billy Long, Republican of Missouri and a vocal Trump supporter, said of the speaker as he left the Capitol on Friday, making clear he did not believe this would be fair. “He’ll get blamed for everything.”
The episode not only demonstrated an inability to honor a longstanding pledge that powered Republicans through a string of election cycles. It was also a remarkable setback for Mr. Ryan as the body’s principal arm-twister, in his first major test as the speaker under a Republican president.
In January, he coasted to re-election with almost unanimous party support, prompting allies to gloat that he had tamed the hard-line House Freedom Caucus far more deftly than his predecessor, John A. Boehner.
By Friday, his bill had at once alienated those archconservatives and more moderate members who abandoned the legislation as Mr. Ryan and Mr. Trump began caving to demands of the far right, to little effect.
“We were a 10-year opposition party, where being against things was easy to do,” Mr. Ryan said at a sheepish news conference shortly after the bill was pulled, adding with uncharacteristic candor that Republicans were not yet prepared to be a “governing party.”
“We will get there,” Mr. Ryan said, “but we weren’t there today.”
His job will not get easier. With disparate coalitions in his conference, outside groups like the political arm of the Heritage Foundation pushing lawmakers to pursue conservative purity, and a less-than-popular president whom some members have appeared more willing to buck recently, there are few establishment forces helping Mr. Ryan keep the peace.
“There is a lot more safety in opposition than there used to be,” said Eric Cantor, the former House majority leader who was ousted by a more conservative challenger, citing pressure from the outside groups.
At the same time, several Trump allies have suggested that Mr. Ryan has still failed to grasp fully the lessons of the president’s election and its rejection of traditional political dogma. The most ominous signals have proliferated on sites like Breitbart, often the online id of Mr. Trump’s orbit. Its lead headlines on Saturday morning included: “Polls: GOP Legislators Dodged 2018 Headache When Leaders Dropped Ryancare” and “Speaker Ryan Crippled? Replacement Chatter Erupts on Hill.”
But as the bill circled the congressional drain, Republicans appeared broadly supportive of Mr. Ryan, grateful for his steady hand and policy fluency and mindful of the risks he took last year as Mr. Trump’s on-again-off-again campaign nemesis, giving members cover during a tumultuous election cycle.
Most suggested there was nothing he could have done differently to secure the necessary votes.
“If he can’t deliver them, they can’t be delivered,” said Representative Chris Collins of New York, a close Trump ally. “I’m certainly not blaming Paul Ryan in the least.”
Others grew more wistful, recalling that Mr. Ryan had to be coaxed into seizing the speaker’s gavel in the first place.
“He didn’t ask to do it,” said Representative Kevin Cramer, Republican of North Dakota. “We wanted a speaker who could articulate our principles, who could go on everybody’s radio shows and everybody’s TV shows, and go district to district in many cases, selling and articulating our philosophy, as well as sometimes pretty nerdy legislative stuff. He was tireless in that effort.”
A handful of Republicans took veiled swipes at the House leadership as the bill flailed. Representative Justin Amash of Michigan wrote Friday night on Twitter that the House was “supposed to be a deliberative body where outcomes are discovered, not dictated.”
“Compromise & consensus cannot be centrally planned,” said Mr. Amash, a member of the Freedom Caucus.
But the chief wild card, as ever, is Mr. Trump. In his private conversations, the president has remained supportive of Mr. Ryan, declining to join in his advisers’ frustrations over how the bill was handled in the House. One adviser described him as still “smitten” with Mr. Ryan.
“I want to thank Paul Ryan. He worked very, very hard,” Mr. Trump said on Friday. “I will tell you that. He worked very, very hard.”
Mr. Trump’s praise for Mr. Ryan seemed to owe, at least in part, to the fact that the speaker had repeatedly kept him informed throughout the negotiations. Mr. Ryan was also exceedingly deferential to the president, casting him for days as the consummate closer and a winner of the highest order. “The president gave his all in this effort,” he said on Friday. “He’s really been fantastic.”
Dynamics could shift quickly. Several of Mr. Trump’s advisers have for days been casting blame on Mr. Ryan, who is close with the president’s chief of staff, Reince Priebus. Mr. Trump is also known to grow angrier over time, particularly if faced with public embarrassment.
On Friday, Mr. Ryan was quick to adopt Mr. Trump’s favored rationale during the health fight, arguing that Republicans had been doing Democrats a grand favor by dismantling President Barack Obama’s health law in the first place and that Democrats would eventually suffer the consequences.
“I’m sure they may be pleased right now,” Mr. Ryan said, but when they see “how bad” things get, “I don’t think they’re going to like that, either.”
Mr. Ryan spoke from the same room where, just two weeks earlier, he delivered a slide show presentation live on cable, holding the attention of the political world — clicker in hand, sleeves peeled above his forearms — with a meditation on insurance premiums and Medicaid spending.
For all the outward displays of collaboration, the exhibition demonstrated the gulfs, both philosophical and stylistic, that divided Mr. Ryan from the Trump White House.
The administration had sought a different visual as the bill debuted to a critical panning: arranging competing stacks of paper in the White House briefing room, meant to demonstrate the relative simplicity of the Republican proposal compared with the thicker Affordable Care Act.
“This is government,” Sean Spicer, the press secretary, said at the time, gesturing first to the Democrats’ bill, then the new one. “This is not.”