WASHINGTON — A chaotic scramble is on to fill the top GOP jobs in the House following Speaker John Boehner’s surprise resignation. Now the same conservatives who pushed him out are maneuvering to yank the next leadership team to the right.

The frenzied action under the Capitol Dome will help determine how Congress contends with upcoming battles on keeping the government running and avoiding a federal default – and whether Republicans can take back the White House next year.

Boehner’s announcement shocked nearly everyone, opening a rare chance for ambitious lawmakers to climb the congressional ladder and for competing factions to exert new sway as an anti-establishment fever sweeps GOP politics.

The front-runner for the speaker’s job, Majority Leader Kevin McCarthy, made his candidacy official Monday in a letter to fellow GOP lawmakers in which he pledged to fight for conservative principles and listen to all members – something Boehner was accused of failing to do.

“If elected speaker, I promise you that we will have the courage to lead the fight for our conservative principles and make our case to the American people,” McCarthy wrote. “But we will also have the wisdom to listen to our constituents and each other so that we always move forward together.”

McCarthy, a Californian in his fifth term, has been endorsed by Boehner. But he faces an opponent in Rep. Daniel Webster, a former speaker of the House in Florida who unsuccessfully challenged Boehner at the beginning of this year and has drawn some conservative support. “I would like to have a principle-based, member-driven Congress,” Webster said in an interview.

And McCarthy’s likely ascent leaves the race for majority leader wide open. It’s already turned into at least a three-way contest with the No. 3 and No. 4 House Republicans, Steve Scalise of Louisiana and Cathy McMorris Rodgers of Washington, aggressively pursuing the job, along with the Budget Committee chairman, Tom Price of Georgia.

All are jockeying to lock down support as the Capitol swirls in chatter about endorsements. One seen as significant: Rep. Paul Ryan, a former vice presidential candidate, announced his decision to endorse Price on Monday.

The House’s tea partyers, some three dozen strong, aren’t fielding a candidate. But they want to see leaders who will take the fight to President Obama and the Democrats, not compromise with them as the realities of divided government led Boehner to do. Some of them question whether McCarthy, who is seen more as a political operator than an ideologue, would deliver that new approach.

“I don’t see how members of the Freedom Caucus can vote for Kevin McCarthy and go home to their town halls and tell them that things will be different now,” said Rep. Thomas Massie, R-Ky.

Boehner’s decision to step down rather than face a nearly unprecedented floor vote to depose him averted immediate crisis, as the Senate was to vote Monday on legislation to keep the government running, and the House was scheduled to follow suit before a Thursday deadline. Despite conservatives’ demands, the bill will not cut off money for Planned Parenthood in the wake of videos focused on the group’s practice of providing fetal tissues for research.