Updated September 25, 2015 1:36 p.m.

John Boehner will resign as speaker of the House at the end of October and leave Congress, choosing to end his tumultuous tenure rather than fight a conservative revolt against his leadership.

Boehner had battled conservatives aligned with the Tea Party for most of his nearly five years as speaker, and in recent weeks they had threatened to try to oust him from power if did not pursue a strategy of defunding Planned Parenthood that would have likely led to a government shutdown. Conservatives said that if Boehner failed to fight on the government spending bill, they would call up a procedural motion to “vacate the chair” and demand the election of a new speaker. Facing the likelihood that he would need Democrats to save him, Boehner instead chose to step down. In one of his last acts as speaker, Boehner is now expected to defy conservatives by bringing up a funding bill that would prevent a government shutdown beginning next week but that would not cut money from Planned Parenthood.

Boehner announced the news to House Republicans in a private party meeting in the basement of the Capitol. “It is my view,” he said in a statement afterward, “that prolonged leadership turmoil would do irreparable damage to the institution.” In the afternoon, he walked into a press conference like a man unburdened, singing the old Disney classic “Zip-A-Dee-Doo-Dah” and alternating between laughs and tears.

Boehner told the assembled reporters he had planned to leave Congress at the end of 2014, but his plans changed after his chief deputy and likely successor, Majority Leader Eric Cantor, lost in one of the biggest electoral upsets in U.S. history. Boehner’s decision comes just a day after what was arguably his most memorable moment as speaker: The Irish Catholic son of a barkeep hosted Pope Francis in the first-ever address by a pontiff to Congress. And it seemed the pope’s message had at least some impact on the timing of the speaker’s decision.

Boehner said he had originally wanted to announce on November 17—his 66th birthday—that he would step down at the end of the year. But the conservative threat to depose him moved up the timetable, and when he woke up Friday on the morning after meeting the pope, he said to himself, “Today is the day I’m going to do this.”

He resisted, however, the notion that conservatives had forced his hand.
“I can tell you, if I wasn’t planning on leaving here soon, I would not have done this,” Boehner said. The famously-emotional speaker broke down several times during his 15-minute news conference, most notably when he recounted a private moment he shared with Pope Francis. As they were leaving the Capitol on Thursday, the pontiff took the speaker aside and asked him to pray for him. “Who am I to pray for the pope,” a deeply-humbled Boehner told reporters. “But I did.”

By ballot or by pressure, conservatives have now succeeded in toppling the top two Republican leaders of the House within a span of 15 months. Boehner’s announcement sets off a race to succeed him, with Majority Leader Kevin McCarthy of California, the second-ranking Republican in the House, the early favorite to take his post. Another popular House Republican, Representative Paul Ryan, immediately took himself out of the running, according to the Washington Post’s Paul Kane. “It’s McCarthy,” the 2012 GOP vice presidential nominee said Friday. Ryan later put out a statement in which he called Boehner’s decision to resign “an act of pure selflessness.”

Boehner, 65, was first elected to the House in 1990 and, as he frequently reminds reporters, was himself part of a group of conservative rabble-rousers during his first decade in Congress. He rose to a position in the leadership before being ousted in 1998. He returned to committee work, playing a key role in the passage of the No Child Left Behind Act under President George W. Bush. Boehner then worked his way back up the leadership ladder, first becoming minority leader and then speaker after Republicans reclaimed the House majority in the 2010 election.

While it was well-known that Boehner’s job was in jeopardy, his announcement Friday morning came as a shock. He has insisted in recent weeks that he was unconcerned about the potential conservative mutiny, with his spokesmen saying he wasn’t “going anywhere.” But the end came rapidly, less than 24 hours after Boehner stood weeping next to the pontiff on a Capitol balcony, overlooking throngs of people gathered to see Pope Francis.

Conservatives outside the Capitol rejoiced at the news. When Senator Marco Rubio announced Boehner’s resignation at the Values Voters Summit in northwest Washington, the crowd erupted in cheers. “I’m not here to bash anyone,” Rubio said, “but the time has come to turn the page.”

While Republicans in Congress characterized Boehner’s decision as an act of sacrifice, Democrats voiced sadness and issued statements bemoaning the departure of a man they often berated. At the White House, President Obama told reporters he was “surprised” to hear about Boehner’s resignation as he ended a meeting with the Chinese president and called the speaker immediately."John Boehner’s a good man. He's a patriot,” Obama said.

We have obviously had a lot of disagreements, and politically we’re at different ends of the spectrum, but I will tell you he has always conducted himself with courtesy and civility with me. He has always kept his word when he made a commitment.

Obama said he would reach out to the next speaker, but he warned whoever replaced Boehner not to shut down the government or default on the nation’s debt in the coming months. The next speaker, the president said, should understand what Boehner understood: “You don’t get what you want 100 percent of the time.”

Harry Reid, the Senate minority leader who once infuriated the speaker by comparing him to a dictator, hailed him on Friday as a pragmatic leader abandoned by his party. “To say that I will miss John Boehner is a tremendous understatement,” he said. Senator Charles Schumer, Reid’s likely successor as Democratic leader, called Boehner "a decent, principled conservative man who tried to do the right thing under almost impossible circumstances.” Yet the Democratic praise for the outgoing speaker was more an indication of their fear that Boehner’s replacement will be even more beholden to the Republican right wing than he was.