House Speaker John Boehner, under fire from conservatives over a looming government shut down, said Friday he will resign from Congress at the end of October. "Prolonged leadership turmoil would do irreparable damage to the institution," he said.
In an afternoon news conference, Boehner became emotional when expressing gratitude to his family and constituents, and said he was proud of what he's accomplished.
However, Boehner said he plans to get as much work done as he can on outstanding fiscal issues before he leaves Congress at the end of October.
He said although he doesn't know what he will do in the future, "I know this, I'm doing this for the right reasons and you know what, the right things will happen as a result."
Boehner, 65, told House Republicans of his decision earlier in the morning. Later, he left a meeting and answered a reporter's shouted question about how he felt with, "It's a wonderful day."
President Barack Obama said he was taken by surprise by Boehner's decision, adding that he called the Republican leader after hearing the news.
"John Boehner is a good man. He is a patriot. He cares deeply about the House, an institution in which he has served for a long time. He cares about his constituents and he cares about America," Obama told reporters at a joint press conference with China's president.
"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," Obama said.
House Majority Leader Kevin McCarthy of California will likely be Boehner's successor, political observers told CNBC. Boehner said that although the choice of the next speaker is up to members of Congress, he thinks McCarthy would make an "excellent speaker."
In a statement, McCarthy praised Boehner for a "depth of character [that] is unmatched," and said he will be missed.
"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.
Republicans cheered loudly when GOP presidential hopeful Marco Rubio announced the news.
"It's not about him or anybody else, and I'm not here to bash anyone, but the time has come to turn the page—the time has come to turn the page and allow a new generation of leadership in this country," the Florida senator said.
Boehner, who was elected in 1990, said he had planned to serve only through the end of 2014 but Majority Leader Eric Cantor's loss last year had changed that calculation.
The news came a day after the Ohio Republican shed tears while sitting behind Pope Francis as the pontiff addressed a joint meeting of Congress.
"Speaker Boehner believes that the first job of any speaker is to protect this institution and, as we saw yesterday with the Holy Father, it is the one thing that unites and inspires us all," the aide said. "The speaker believes putting members through prolonged leadership turmoil would do irreparable damage to the institution."
In a late morning statement, Boehner confirmed his plans hours after the initial report of his resignation sent shock waves through Washington.
"My mission every day is to fight for a smaller, less costly and more accountable government. Over the last five years, our majority has advanced conservative reforms that will help our children and their children. I am proud of what we have accomplished.
"The first job of any speaker is to protect this institution that we all love. It was my plan to only serve as speaker until the end of last year, but I stayed on to provide continuity to the Republican Conference and the House. 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.
"Today, my heart is full with gratitude for my family, my colleagues and the people of Ohio's Eighth District. God bless this great country that has given me—the son of a bar owner from Cincinnati—the chance to serve."
Democratic Leader Nancy Pelosi called Boehner's resignation a "seismic" event.
Some analysts, including KBW's Brian Gardner, said Boehner's exit decreases the chances of a government shutdown in a fight over Planned Parenthood funding.
"The speaker is taking one for the team: He's going to probably try and strike a deal that includes congressional Democrats, which would have been poison for a group of conservatives who would have rebelled against him," Gardner said. "It's a very fluid situation, but my immediate takeaway is that this decreases the likelihood of a government shutdown."
Such a deal, he said, would be a "clean" continuing resolution that does not strip funding from Planned Parenthood "because the votes just weren't there for that."
Short-term Treasury yields spiked on the Boehner news. "It adds some uncertainty and depending on how the battle is going to go, it could even bring the Fed into question," said David Ader, CRT Capital chief treasury strategist.
Republicans have attempted to defund Planned Parenthood in the past, but Rep. Mick Mulvaney, Republican of South Carolina, has led the latest effort this summer following the release of videos by an anti-abortion group that allege Planned Parenthood branches sold parts of fetuses for profit.
Three forensics experts hired by a consultant paid for by Planned Parenthood concluded the group behind the videos, the Center for Medical Progress, heavily edited and manipulated them to suggest wrongdoing.
Investigations in five states where the videos were shot determined Planned Parenthood acted within the bounds of the law. A 1993 law allows abortion providers to be reimbursed for the cost of handling and transporting fetal specimens donated for medical research.
"I want to thank Speaker Boehner for his efforts to make our party, the state of Ohio, and our nation stronger," Reince Priebus, Republican National Committee chairman, said in a statement. "He has been a tireless advocate for conservative principles who has raised millions to elect and re-elect Republicans to the House of Representatives. Our party owes him a great debt, and I wish him and Debbie the best as he continues to make contributions to the Republican Party and America."
—CNBC's Tom DiChristopher, NBC News and Reuters contributed to this report.