WASHINGTON — Representative Paul D. Ryan said Thursday that he would seek to replace John A. Boehner as House speaker after two factions of the House Republicans — one small and moderate, one mainstream and large — endorsed him, bringing him close to securing the speaker’s gavel he had never wanted to seek.

“I never thought I’d be speaker,” Mr. Ryan said in a lengthy email to his Republican colleagues. “But I pledged to you that if I could be a unifying figure, then I would serve, I would go all in. After talking with so many of you and hearing your words of encouragement, I believe we are ready to move forward as one, united team. And I am ready and eager to be our speaker.”

The approvals from the two House factions came less than 24 hours after a majority of members of the Freedom Caucus, which includes some of the most conservative House members, said they, too, would support Mr. Ryan’s bid. The Republican conference is expected to vote on Mr. Ryan on Wednesday, followed by a vote on the House floor next Thursday. The rapid consolidation of support in the party was a testament to Mr. Ryan’s popularity among House Republicans.

Just a few weeks ago, Mr. Ryan, the chairman of the powerful Ways and Means Committee, insisted that he had no interest in the speaker’s job. But after Representative Kevin McCarthy of California, the majority leader, failed to unite the factions and withdrew his bid, the pressure began to build on Mr. Ryan, his party’s vice-presidential nominee in 2012, to try to bring the raucous conference together.

In Mr. Ryan, 45, the Republican majority would have a young new face. His young family, athleticism and heavy metal playlist combine to make a stark contrast to Mr. Boehner, a symbol of weatherworn Washington longevity. Even so, Mr. Ryan would be the most experienced member of the new leadership team.

The acquiescence of the Freedom Caucus was particularly remarkable given that the group, which was largely responsible for pushing Mr. Boehner out of his job and blocking Mr. McCarthy from replacing him, came armed with a long list of demands to earn their support. Mr. Ryan accepted none beyond a general agreement to look at and work on the House rules.

The hard-liners also broke with their habit of voting as a bloc when 80 percent of their roughly 40 members agree on something. The caucus said it had a “supermajority” of about 70 percent of its members who supported Mr. Ryan despite falling short of their established threshold for an endorsement. Mr. Ryan needs 218 votes on the House floor to become speaker.

But it was Mr. Ryan, who said he would not seek the job unless his own conditions were met, who emerged victorious. Most of his demands are now in place, and the Freedom Caucus members, under intense pressure from their colleagues, appear divided and cowed.

Notably, Mr. Ryan seeks to change a House rule that allows a single member to file a motion to remove the speaker; Mr. Ryan said he wanted to change that process to make it that much more difficult, noting, “No matter who is speaker, they cannot be successful with this weapon pointed at them all the time.”

Mr. Boehner, who will retire from Congress at the end of the month, was under continual threat of a challenge to his speakership.

“Their vote on Paul Ryan is recognition by many of them that they have overplayed their hand with their colleagues,” said Representative Tom McClintock, Republican of California, who quit the Freedom Caucus in protest of its tactics. “They had to show a little more reasonableness.”

Chastened or not, the group is showing no sign of going away. Opposition from the hard-liners on Thursday to a debt ceiling proposal appears to have scuttled it before it could reach a vote. And that proposal, from the conservative Republican Study Committee, was hardly a concession to President Obama. It demanded a commitment of $3.8 trillion in federal spending cuts over the next decade in exchange for a $1.5 trillion increase in the government’s statutory borrowing limit.

That limit will be reached Nov. 3, the Treasury Department has warned, after which the government will quickly run out of cash. With a potentially devastating default looming, the Freedom Caucus may well end up agitating for another showdown.

“I think it is a high-water mark for the group,” said Representative Mick Mulvaney, Republican of South Carolina, in an email. “We are absolutely satisfied that Paul is committed to the same sort of reforms that we have been” urging from the very beginning.

He added: “Bottom line: I think we are actually in a better place. And my guess is that there are a lot of people out there running for Congress who want to be members of the group if they get here.”

The group’s sheer numbers — enough to block legislation and other matters — and its agenda are a reminder that a Speaker Ryan might unify the House Republican Conference around his election, but he has far to go to rally them around a legislative agenda.

In December, when Congress faces another deadline to pass a spending measure to keep the government open, they may well employ tough tactics that put Mr. Ryan in the same difficult box that often enclosed Mr. Boehner.

“I think some of this has to do with Paul’s level of gravitas around here,” said Representative Reid Ribble, Republican of Wisconsin, who also left the Freedom Caucus. “They gained some standing among their colleagues by not serving as a block to Congressman Ryan.”

The Republican Study Committee, a group of more than 170 members that was once the most conservative wing of the House, also said it would endorse Mr. Ryan. “After hearing Paul lay out his vision for the future of the Republican conference, I am confident that he is the right person to lead the House going forward,” Representative Bill Flores of Texas, the chairman of the committee, said in a statement.

Another far smaller faction, the Tuesday Group, which is made up of a few dozen moderate members, also said that Mr. Ryan was the man for the job.

A version of this article appears in print on , Section A, Page 19 of the New York edition with the headline: After More Shows of Support by Party, Ryan Agrees to Seek Job of Speaker. Order Reprints | Today’s Paper | Subscribe