Media playback is unsupported on your device Media caption Fighting tears, Boehner revealed a private moment with the Pope

US House Speaker John Boehner will resign from his leadership position and give up his seat at the end of October.

Mr Boehner made the decision while praying on Friday morning - a day after hosting Pope Francis at Congress.

Fighting back tears, the 65-year-old said at a news conference that "turmoil" over his leadership would do lasting damage to the House.

Mr Boehner has been under pressure from the conservative wing of his party ever since he took the job in 2011.

He suggested a private moment with the pontiff was partly behind the decision.

"The Pope puts his arm around me and kinda pulls me to him, and says 'please pray for me'. Well, who am I to pray for the pope, but I did."

Analysis - Anthony Zurcher, BBC North America reporter

Mr Boehner becomes the first casualty in this new anti-establishment wave in the Republican Party.

The challenge of managing the day-to-day operations of the House of Representatives while satisfying an increasingly unruly - and growing - faction of hardcore conservative backbenchers has finally brought him down.

There once was a time when a speaker could bend the House of Representatives to his will by offering rewards and meting out punishment for transgressions.

Those days are long gone, as members of Congress now answer to outside constituencies and interests.

Read in full: Boehner victim of angry Republican base

Twitter loses its favourite tearjerker

President Barack Obama said he was surprised by the news and had called Mr Boehner.

The son of an Ohio barman, Mr Boehner assumed the leadership position in January 2011, when Republicans took control of the House. Since then he has faced down several rebellions.

The resignation comes as Republicans have been deliberating over plans to defund women's healthcare provider Planned Parenthood.

The organisation has come under fire from anti-abortion activists who claimed its employees were selling foetal organs.

Hardline conservatives have urged the leadership to stall a government funding bill - prompting a government shutdown - if language defunding the healthcare provider is not included.

Media playback is unsupported on your device Media caption "It's a wonderful day", says Boehner

Republican Kevin McCarthy, a top pick to replace Mr Boehner, said in a written statement that now was the time to focus on "healing and unifying".

And veteran congressman Peter King said the party had been "blackmailed" and the "crazies have taken over".

The speaker's Democratic counterpart pulled no punches in a morning news conference held after the announcement.

Describing Mr Boehner's resignation as "seismic", House Minority Leader Nancy Pelosi said, "The disarray among House Republicans, their obsession with shutting down government at the expense of women's health needs to be reckoned with and recognised".

Image copyright @JebBush / Twitter Image caption Presidential candidate Jeb Bush was quick to praise his fellow Republican

On Thursday, Pope Francis became the first pontiff to address a joint session of Congress following an invitation from the Catholic House speaker.

Mr Boehner's staff said that he had intended to resign at the end of last year, but the surprise defeat of then House Majority Leader Eric Cantor "changed that calculation".