WASHINGTON — Speaker John A. Boehner, under intense pressure from conservatives in his party, announced on Friday that he would resign one of the most powerful positions in government and give up his House seat at the end of October, as Congress moved to avert a government shutdown.
Mr. Boehner, who was first elected to Congress in 1990, made the announcement in an emotional meeting with his fellow Republicans on Friday morning.
The Ohio representative struggled from almost the moment he took the speaker’s gavel in 2011 to manage the challenges of divided government and to hold together his fractious and increasingly conservative Republican members.
Most recently, Mr. Boehner, 65, was trying to craft a solution to keep the government open through the rest of the year, but was under pressure from a growing base of conservatives who told him that they would not vote for a bill that did not defund Planned Parenthood.
Mr. Boehner’s stunning announcement lessens the chance of a government shutdown as Republican leaders in Congress will push for a short-term funding measure to keep the government operating and the speaker will no longer be deterred by those who threatened his job.
It will be up to the majority of the members of the House now to choose a new leader, and the leading candidate is Representative Kevin McCarthy of California, the majority leader, who is widely viewed more favorably by the more conservative members. The preferred candidate among many Republicans, Representative Paul Ryan of Wisconsin, has said he does not want the job.
“John Boehner has been a great leader of the Republican Party and the House of Representatives,” Mr. Ryan said Friday in a prepared statement. “This was an act of pure selflessness. John’s decades of service have helped move our country forward, and I deeply value his friendship. We will miss John, and I am confident our conference will elect leaders who are capable of meeting the challenges our nation faces. I wish John and his family well as he begins the next phase of his life.”
Representative Charlie Dent, Republican of Pennsylvania, said: “The next speaker is going to have a very tough job. The fundamental dynamics don’t change.”
Mr. Dent said there was “a lot of sadness in the room” when Mr. Boehner made his announcement to colleagues. He blamed the hard-right members, who he said were unwilling to govern. “It’s clear to me that the rejectionist members of our conference clearly had an influence on his decision,” Mr. Dent said. “That’s why I’m not happy about what happened today. We still have important issues to deal with, and this will not be easier for the next guy.”
“The fundamental dynamics don’t change,” Mr. Dent said. “The dynamics are this: There are anywhere from two to four dozen members who don’t have an affirmative sense of governance. They can’t get to yes. They just can’t get to yes, and so they undermine the ability of the speaker to lead. And not only do they undermine the ability of the speaker to lead, but they undermine the entire Republican conference and also help to weaken the institution of Congress itself. That’s the reality.
“Now, if we have a new speaker, is there going to be an epiphany? They won’t be happy if it’s Paul Ryan or Kevin McCarthy, who will have to make accommodations with a Democratic president and the Senate constituted the way it is.”
Mr. Boehner’s announcement came just a day after Pope Francis visited the Capitol, the fulfillment of a 20-year dream for Mr. Boehner, the son of a tavern owner from a large Catholic family, of having a pontiff address Congress. He had a private audience with Francis before the pope’s address to a joint meeting of Congress.
Mr. Boehner wept openly as the pope spoke to an audience gathered on the West Lawn of the Capitol Thursday, no doubt understanding that it was his last grand ceremony as speaker, and indeed a capstone to his long political career, which began in the Statehouse in Ohio.
“I am happy that one of his final memories will be watching the Pope address an institution the Speaker loved and served for many years,” said Representative Trey Gowdy, Republican of South Carolina. “He had an incredibly hard job, as whoever takes his place will learn.”
At the Family Research Council’s “Values Voter Summit,” which was taking place just a few blocks from the Capitol, many jumped to their feet and cheered when Senator Marco Rubio, Republican of Florida, announced that Mr. Boehner was resigning.
“It’s time to turn the page,” Mr. Rubio said, deviating from his prepared text in an assertion tailored to the audience, whose views align with many who wanted to oust Mr. Boehner.
One of those fed-up Republicans is Joe Glover, a retired businessman from the Dallas area who was at the conference and could barely restrain his jubilation.
“I think it’s awesome,” Mr. Glover said. “Number one, he needed to go, and number two, it should give us an opportunity to have a fresh voice and fresh leadership because we haven’t seen the leadership from that office we need to see.”
Few Republicans have better channeled this sort of grassroots anger toward the party leadership than Mr. Cruz. “This has never been about one person,” Mr. Cruz said. “This is about whether Congress keeps its word to the men and women who elected us. Any speaker who does so, I will celebrate. And any speaker who doesn’t will not be doing his or her job.”
Mr. Cruz declined to offer his view of Mr. McCarthy, saying only that he hoped House Republicans “select a strong conservative.”
While some conservatives were celebrating, one prominent Republican was upset at the news.
Senator John McCain of Arizona was taken aback, and he said Mr. Boehner’s resignation had perilous implications for Republican prospects going into next year’s elections.
“It means that’s it in disarray,” Mr. McCain said in a brief interview. “Basically he has been unseated. And that’s not good for the Republican Party.”
His advice? “We’ve got to unite and recognize who the adversary is.”
For decades, Mr. Boehner had legislated as a stalwart Republican institutionalist. He became speaker after a Tea Party wave in the 2010 election swept Republicans into the majority of the House on a call for dramatically curbing federal spending and the role of government.
It was an agenda Mr. Boehner supported, but he quickly found himself hamstrung by the new members of Congress who were undaunted by the fact that Democrats controlled much of Washington and that their ability to fulfill their goals would have its limits.
That conflict resulted in a 16-day government shutdown in October 2013, the brink of default on the nation’s debt service and the undoing of former Representative Eric Cantor of Virginia, the House majority leader. Mr. Cantor oversaw the movement of the right to empower Republicans, but he was ultimately defeated in a primary in 2014 by an unknown challenger whose candidacy was fueled by Tea Party energy.
A similar dynamic is shaping the Republican presidential primary process, with both Donald J. Trump and Mr. Cruz openly critical of congressional leaders.
On Friday, even as Republican members of Congress reeled from the news, the architects of the right-leaning movement cheered.
“Americans deserve a Congress that fights for opportunity for all and favoritism to none,” said Michael A. Needham, the chief executive of Heritage Action, a policy arm of the conservative Heritage Foundation. “Too often, Speaker Boehner has stood in the way. Today’s announcement is a sign that the voice of the American people is breaking through in Washington. Now is the time for a principled, conservative leader to emerge. Heritage Action will continue fighting for conservative policy solutions, and we look forward to working with the new leadership team.”
Most recently, Mr. Boehner, a warrior in the anti-abortion movement for 30 years, was under pressure to try to cripple Planned Parenthood as part of a deal to keep the government open.