Mr Ryan said he would retire in January after finishing his congressional term.

Fleeing a sinking ship?

Analysis by Anthony Zurcher, BBC News, Washington

Paul Ryan had to be coaxed into taking the speaker's gavel in 2015 and never seemed to relish the job. Rumours had been swirling in conservative circles for months that he was eyeing the exits.

The speaker will frame his decision as one of putting family first - and, with young children, the fundraising and legislative duties of the office are burdensome - but it's impossible not to view the move in a larger political context. He's had frequent clashes with Donald Trump, and their differences - in temperament and policy - continue to be stark.

A mid-term election looms, and there are at least even odds that a Democrat could be speaker next year. Even if Republicans prevail, their majority will certainly be diminished, making the job of passing legislation through a party already torn between moderates and ideological hardliners all the more difficult.

Rather than go down with the ship - or perhaps suffer the same fate as Tom Foley in 1994, the last sitting speaker to lose a re-election race - Mr Ryan is reserving his seat on a lifeboat. He's not the first congressional Republican to do so, and with the top man leading the way, more are sure to follow.

Image copyrightGetty ImagesImage caption
Mr Ryan - with his wife, Janna, and daughter, Liza, by his side - was re-elected comfortably in 2016

According to Axios, which broke the story, he has found his job frustrating, partly because of President Donald Trump.

"Stay tuned for more retirements as Republicans increasingly realise that their midterm prospects are doomed," the fundraising committee added.

Mr Ryan's seat in Wisconsin's first district could now fall into Democratic hands, according to analysts at the Cook Political Report and Sabato's Crystal Ball.

All 435 House lawmakers and 35 senators will face the voters this November, in what will amount to a referendum on Republican control of Congress and the White House.

The resignation of Mr Ryan - whose role as House speaker places him second-in-line to the president after Vice-President Mike Pence - will spark speculation about whether he could one day mount a White House campaign.

The clean-cut conservative, who has served in the House since 1999, was the Republican vice-presidential running mate for Mitt Romney in 2012.