Two decisions by the California Republican contributed to his undoing.

The first came during the agonizing 15 votes he endured over four days early this year when he agreed to a change of House rules allowing any single member of the House to call for a motion to oust the speaker. Coupled with his narrow 221-212 majority, that made it relatively easy for a single hard-right member, Representative Matt Gaetz, to call for his ouster.

The second came on Saturday, when McCarthy opted to avert triggering a partial government shutdown by introducing a stopgap funding bill that passed the House with more Democratic than Republican votes.

Gaetz had been threatening to move against McCarthy for days at that point, and a senior Republican told Reuters at the time that McCarthy had concluded he would face a challenge to his leadership no matter what he did.

"I want to keep government open while we finish our job," McCarthy told reporters when he emerged from a closed-door Saturday morning party meeting where he laid out that plan.

On Tuesday, eight members of his party joined 208 Democrats to oust McCarthy as speaker in a 216-210 vote. McCarthy will continue as a rank-and-file member of the House.

McCarthy, who had managed to smile through much of the Tuesday's ordeal, soon chose not to stand again for the position and struck a gracious tone at a press conference.

"I may have lost a vote today. But as I walk out of this chamber, I feel fortunate to have served the American people," McCarthy, 58, told reporters. "It was my greatest honor to be able to do it."

He had angered lawmakers of both parties during his time as speaker.

He steered a narrow majority, currently 221-212, through a long spring standoff that saw the U.S. come perilously close to defaulting on its $31.4 trillion in debt. Just a few months later, shutdown loomed.

Republican hardliners, cheered on by former President Donald Trump, urged McCarthy to push harder against the Democratic-majority Senate and President Joe Biden, to demand cuts to federal spending on domestic social programs and other conservative priorities.

Members of his own party repeatedly rejected measures McCarthy brought to the floor.

Democrats, meanwhile, seethed after McCarthy backed out of a May deal he had reached with Biden on spending levels for the fiscal year that began Oct. 1, and grew angrier when he launched an impeachment inquiry into Biden.

That move, Democrats contend, was meant as a reprisal for Trump's historic two impeachments, both of which ended in acquittal on the votes of Senate Republicans.

RUDDERLESS HOUSE

The House will now drift rudderless in the coming days, with a potential shutdown in mid-November.

The episode demonstrated the formidable challenge that has overshadowed the speaker's post for Republicans in recent years, with John Boehner resigning the post in 2015 after a struggle with rebellious conservatives.

Boehner's successor, Paul Ryan, a frequent target for conservatives, decided not to seek reelection in 2018 as Trump shifted the party focus from Ryan's fiscal priorities to immigration and culture-war issues.

"Frankly, one has to wonder whether or not the House is governable at all," Republican Representative Dusty Johnson told reporters after McCarthy's ouster.

Lawmakers have pointed to several prominent Republicans as possible successors to McCarthy: Majority Leader Steve Scalise, Republican whip Tom Emmer, House Budget Chairman Jodey Arrington and Representative Kevin Hern, who leads the conservative Republican Study Committee.

The high point of McCarthy's tenure came in May when McCarthy enjoyed a rare moment of victory by forcing Biden to negotiate a deal on national debt that averted a default.

His masterstroke in getting Biden to the negotiating table had been his decision to bring a Republican debt ceiling bill to the floor and pass it in April with only the support of his own party members.

But hardliners soon used their leverage to shutter the House floor in protest over the spending level that McCarthy had agreed to Biden.

(Reporting by David Morgan; Editing by Scott Malone and Stephen Coates)

By David Morgan