U.S. House of Representatives Speaker John Boehner will step down and leave Congress at the end of October after struggling with repeated rebellions by conservatives during a tumultuous five-year reign as the chamber’s top Republican.

The Ohio lawmaker, 65, stunned Republican House members at a meeting on Friday with the announcement he will leave the top job in the 435-seat chamber and resign his seat effective on Oct. 30.

U.S. Representative Kevin McCarthy, 50, of California, the No. 2 House Republican, quickly became the leading contender to replace Boehner as speaker. McCarthy has been loyal to Boehner during his frequent tussles with conservatives, but is also close to Tea Party conservatives and in recent months has tacked to the right.

Boehner (pronounced BAY-ner) declined to endorse anyone as his successor, but told reporters McCarthy “would make an excellent speaker.”

Boehner has faced constant pressure from conservatives who believe he was too willing to compromise with President Barack Obama and too likely to rely on Democratic votes to pass crucial legislation.

Obama praised the speaker as “a good man” and said he hoped Boehner would want to get as much done as he can before he leaves.

Boehner told reporters he was stepping aside to avoid another brewing House battle over his leadership. Conservatives had threatened a House revolt and possible government shutdown over spending next week.

“It’s become clear to me this prolonged leadership turmoil would do irreparable harm to the institution,” Boehner told a news conference, frequently fighting back tears.

“It’s the right time to do it, and frankly I’m entirely comfortable doing it,” he said.

Boehner’s move appeared to ease the threat of a government shutdown next week. Many Republicans said it would free him to forge ahead with a “clean” spending bill that does not withhold funding from the women’s reproductive health group Planned Parenthood without fear of reprisal from conservatives who object to the group’s abortion services.

But the battle over his successor could coincide with fights later this year over government spending and raising the federal debt limit, complicating the political battles and adding more uncertainty for financial markets.

House Democratic leader Nancy Pelosi, a longtime foe of Boehner’s, said his pending departure would be “a distraction” during the spending debate and called his decision “seismic to the House.”

On Thursday, Boehner, a Catholic, realized a longtime goal of hosting Pope Francis for an address to Congress and broke down in tears as he stood with the pope to greet crowds on the Capitol’s West front.

‘TODAY’S THE DAY’

Boehner said he had come to the conclusion on Friday morning that “today’s the day.” He informed staff just before the morning meeting with Republican House members.

“I saw him recently and he looked weary. Understandably, he was tired,” U.S. Senator John McCain, also a Republican, told reporters. “Sometimes we fail to appreciate that these are human beings with human emotions and lives to lead.”

An NBC News/Wall Street Journal opinion poll on Friday found 72 percent of Republican primary voters were dissatisfied with Boehner and Senate Republican Leader Mitch McConnell.

Many Republican lawmakers said McCarthy would likely be the next speaker. McCarthy shifted to the right of Boehner this year by abandoning support for renewing the charter of the U.S. Export-Import Bank.

Conservatives successfully killed renewal of the bank’s charter, arguing government should not meddle by picking economic winners and losers. Ex-Im offers financing to foreign buyers of U.S. goods.

“Now is the time for our conference to focus on healing and unifying to face the challenges ahead and always do what is best for the American people,” McCarthy said in a statement.

There was no immediate market reaction.

Phil Orlando, chief equity market strategist at Federated Investors, said: “The near-term news is good in that it suggests that Boehner is going to get a clean bill through as his last act as Speaker, but the question becomes what happens post-Halloween and who the new speaker is going to be.”

The son of a bar owner and one of 12 children, Boehner is the only college graduate in his family. He grew up in Cincinnati and served in the U.S. Navy in 1969, then became a small businessman before launching a political career.

On Thursday evening as Boehner left the Capitol, he told two reporters – one from Politico and another from the Washington Post – that he had nothing left to accomplish after bringing Pope Francis to the Capitol, Politico reported.