House Speaker John Boehner of Ohio, center, leaves a meeting with House Republicans on Capitol Hill in Washington, Friday, Sept. 25, 2015. In a stunning move, Boehner informed fellow Republicans on Friday that he would resign from Congress at the end of October, giving up his top leadership post and his seat in the House in the face of hardline conservative opposition. (AP Photo/Jacquelyn Martin)

House Speaker John Boehner of Ohio, center, leaves a meeting with House Republicans on Capitol Hill in Washington, Friday, Sept. 25, 2015. In a stunning move, Boehner informed fellow Republicans on Friday that he would resign from Congress at the end of October, giving up his top leadership post and his seat in the House in the face of hardline conservative opposition. (AP Photo/Jacquelyn Martin)

WASHINGTON (AP) โ€” With Congress in turmoil, House Speaker John Boehner suddenly informed fellow Republicans on Friday that he would resign at the end of October, stepping aside in the face of hardline conservative opposition that threatens an institutional crisis.

The 13-term Ohio Republican shocked his GOP caucus Friday morning when he announced his decision in a closed-door session. It came one day after a high point of Boehnerโ€™s congressional career, a historic speech by Pope Francis to Congress at Boehnerโ€™s request.

A constant focus of conservativesโ€™ complaints, Boehner was facing the threat of a floor vote on whether he could stay on as speaker, a formal challenge that hasnโ€™t happened in over 100 years. That was being pushed by tea partyers convinced Boehner wasnโ€™t fighting hard enough to strip Planned Parenthood of government funds, even though doing so risked a government shutdown next week.

โ€œThe first job of any speaker is to protect this institution that we all love,โ€ Boehner said in a statement not long after announcing his resignation to his colleagues. โ€œIt is my view, however, that prolonged leadership turmoil would do irreparable damage to the institution. To that end, I will resign the speakership and my seat in Congress on Oct. 30.โ€

โ€œOver the last five years, our majority has advanced conservative reforms that will help our children and their children,โ€ Boehner said. โ€œI am proud of what we have accomplished.โ€

Some conservatives welcomed the announcement.

Rep. Tim Huelskamp of Kansas said โ€œitโ€™s time for new leadership,โ€ and Rep. Tom Massie of Kentucky said the speaker โ€œsubverted our Republic.โ€

โ€œI think it was inevitable,โ€ Massie said. โ€œThis is a condition of his own making right here.โ€

But more mainstream Republicans said it would be a pyrrhic victory for the tea partyers.

โ€œThe honor of John Boehner this morning stands in stark contrast to the idiocy of those members who seek to continually divide us,โ€ said Rep. David Jolly of Florida.

โ€œThe shutdown caucus as I call them has a small victory,โ€ Jolly said.

Although itโ€™s not certain who will succeed Boehner, the most obvious candidate would be the No. 2 House Republican, Kevin McCarthy, a genial Californian who was first elected to Congress in 2006. Regardless of what he does, Boehnerโ€™s departure ensures a major leadership race in which tea party conservatives would be expected to field a candidate.

Boehner, with his relaxed and sociable demeanor, love of golf, and well-known tendency to cry in public, Boehner was widely popular among House Republicans. Though he is also known as a strong conservative, his tactics were never confrontational enough to satisfy the most conservative faction in the House.

Boehnerโ€™s decision removes the possibility of a damaging vote to strip him of his speakership, a scenario that grew more likely amid the clamor over a possible shutdown.

Boehner took over the speakership in January 2011. His tenure has been defined by his early struggles to reach budget agreements with President Barack Obama and his wrestling with the expectations of tea party conservatives who abhorred his tendencies toward deal-making.

Two years ago, conservatives drove him to reluctantly embrace a partial government shutdown in hopes of delaying implementation of Obamaโ€™s new health care law. The tactic was unsuccessful. Nonetheless, tea party lawmakers had been pressing him to retry the tactic to try to take away federal funding from Planned Parenthood following the disclosure of controversial videos involving its practices of procuring fetal tissue for research purposes.

As he told lawmakers Friday of his plan to resign, Boehner also announced plans to schedule a vote on a government funding bill that includes money for Planned Parenthood before next weekโ€™s deadline. It will be likely to pass with Democratic support, notwithstanding conservative complaints.

Surprised Democrats saw disorder in the House GOP, with Minority Leader Nancy Pelosi calling Boehnerโ€™s resignation โ€œseismic.โ€

โ€œThe disarray among the House Republicans and their obsession with shutting down government over womenโ€™s health needs to be reckoned with and recognized,โ€ said Pelosi, who learned of Boehnerโ€™s decision when Democratsโ€™ phones started buzzing in the partyโ€™s own closed-door caucus.

Even as they praised Boehner for a selfless move, some of his allies questioned whether it would make a difference.

โ€œI think itโ€™s an incredibly selfless act. I wish he were staying,โ€ said Rep. Carlos Curbelo, R-Fla. โ€œI donโ€™t know that it will help us. Because heโ€™s not the problem in our conference.โ€

The turmoil in Congress is playing out against an already roiling race for the GOP presidential nomination in which the candidates at the top of opinion polls are all Washington outsiders. Many of the GOP candidates have criticized Boehner and his Senate counterpart, Majority leader Mitch McConnell, R-Ky., whoโ€™ve seen their approval ratings sag even among Republicans.

In remarks on the Senate floor, McConnell praised Boehner as an ally and friend who transformed โ€œa broken and dispirited Republican minority into the largest Republican majorityโ€ since 1931.

Religious conservatives, in Washington for the Family Research Councilโ€™s Values Voter Summit, erupted in extended applause when Florida Sen. Marco Rubio informed them that Boehner was resigning.

โ€œIโ€™m not here to bash anyone,โ€ Rubio said told the buzzing crowd, โ€œbut the time has come to turn the page.โ€

Boehner was first elected to the House in 1990 and soon established a strongly conservative record. He was part of former Speaker Newt Gingrichโ€™s leadership team when Republicans took over the House in 1995 for the first time in four decades but was ousted from his leadership role in the wake of the GOPโ€™s disappointing performance in the 1998 midterms.

He won a 2006 race to succeed Tom DeLay as the Houseโ€™s No. 2 Republican when DeLay stepped aside as majority leader. He took over as the top Republican in the House in 2007 after Democrats retook the chamber.

___

Associated Press writers Steve Peoples and Andrew Taylor contributed to this report.