Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Republican House Speaker John Boehner has formally announced that he will resign as Speaker and leave his seat at the end of October.

Boehner, who shocked official Washington with the abrupt announcement, said that he made the final decision to announce his resignation on Friday morning and told his staff shortly before a closed door meeting of Republicans.

"I told them: 'This is the day. It's going to happen some day. Why not today?'" he said.

Boehner said the decision "isn't about me" but is meant to help preserve the institution of Congress as he faces the strongest challenge to his gavel to date.

"It had become clear to me that the prolonged leadership turmoil would do irreparable harm to the institution," he said.

"I don't want to put my colleagues through this. For what?" an emotional Boehner added.

But he also insisted that he was not forced out of the job, saying that he had always planned to resign his seat at the end of the year.

“If I wasn’t planning on leaving here soon, I wouldn’t have done this,” he said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

He will resign the Speakership and his seat in Congress, effective October 30.

Boehner has been under prolonged pressure from conservatives in his party, who have accused him of failing to fight the Obama administration on issues important to the GOP.

Foes within his party had been pushing to oust him if he presented any legislation that would continue to fund the government and avoid a government shutdown without stripping federal funding for Planned Parenthood.

News of Boehner's resignation was vigorously cheered at a gathering of social conservatives just miles from the Capitol in Washington D.C. Republican presidential candidate Marco Rubio announced the news and told the crowd that "the time has come to turn the page and allow a new generation of leadership in this country."

In remarks Friday, President Barack Obama called Boehner a "good man" and said Boehner, a frequent opponent, understood that no one ever gets 100 percent of what they want in a negotiation.

House Ways and Means Committee chair Paul Ryan, considered a possible successor to the outgoing House Speaker, told reporters Friday that he is not interested in pursuing the job.

Photo Gallery: Key Moments in Boehner's Career

Boehner's second in command, House Majority Leader Kevin McCarthy of California, is considered a top prospect.

On Friday, Boehner would not endorse one specific successor, saying that the next leader of the party is up to its members. But he added that McCarthy would make an "excellent" Speaker.

Boehner was front and center during Thursday’s address to Congress by Pope Francis. Boehner, who is Catholic, sat directly behind the pontiff and was visibly emotional for most of his speech.

He related to reporters an emotional story about speaking with Pope Francis during the visit, saying that the pope implored the House Speaker to "pray for me."

Boehner was first elected to Congress in 1990. He became Speaker of the House in 2011.

"I'm doing this today for the right reasons," he said. "And for that reason the right results will follow."

— NBC's Carrie Dann, Mark Murray, Luke Russert, Kate Snow and Alex Moe contributed to this report.