WASHINGTON (AP) — House Speaker John Boehner abruptly announced his resignation Friday, stunning Capitol Hill and beyond. The 13-term Ohio Republican is second in line to the presidency and has served as speaker since January 2011. President Barack Obama and two former presidents were among those who spoke out after Boehner revealed his plans.

President Barack Obama

"He has kept his word when he made a commitment. He is somebody who has been gracious. And I think maybe most importantly, he's somebody who understands that in government, in governance, you don't get 100 percent of what you want, but you have to work with people who you disagree with — sometimes strongly — in order to do the people's business."

Former President George W. Bush

"Speaker Boehner is a master of the legislative process who has always demonstrated great respect for the institutions of Congress. I congratulate and thank him for his years of service to his constituents in Ohio and to the American people."

Former President George H.W. Bush

"He has given selflessly and tirelessly of his energy, and I would think every Republican would be grateful to him for his contributions to and leadership of not only our great party, but also the U.S. House of Representatives."

Former Senate Republican Leader Bob Dole

"Since his election to leadership, he has unfortunately been plagued by a group of Republican naysayers, including one from Kansas ... I doubt this group of obstructionists will be supportive of whomever succeeds John as speaker, but we can always hope they will become team players."

Senate Majority Leader Mitch McConnell, R-Ky.

"Speaker Boehner was able to transform a broken and dispirited Republican minority into the largest Republican majority since the 1920s. That's a legacy few can match. That a young man from Reading, Ohio wielding a bar towel could one day wield the gavel of the U.S. House of Representatives, it reminds us of the continuing promise of this country."

Senate Democratic Leader Harry Reid

"I have not always agreed and I wasn't always happy with what John told me. But he never, ever misled me. He never, ever told me something that wasn't true. His word was always good."

House Democratic Leader Nancy Pelosi

"The resignation of the speaker is a stark indication of the disarray of the House Republicans. It is a demonstration of their obsession with shutting down government at the expense of women's health and a sign of the failure of the House Republicans to be willing to engage in dialogue for the good of the American people and for us to move forward."

Sen. Ted Cruz, R-Texas

"The country will be better served with a strong conservative speaker."