House Majority Leader Kevin McCarthy of Calif., speaks during a news conference on Capitol Hill in Washington, Wednesday, Nov. 14, 2018, following a meeting for the House Republican leadership elections. McCarthy easily won an internal party election Wednesday to take over the shrunken House GOP caucus, a familiar role for the underestimated scrapper whose top priority will be to protect President Donald Trump's agenda and try to build the party back to retake the majority. (AP Photo/Susan Walsh)

House Majority Leader Kevin McCarthy of Calif., speaks during a news conference on Capitol Hill in Washington, Wednesday, Nov. 14, 2018, following a meeting for the House Republican leadership elections. McCarthy easily won an internal party election Wednesday to take over the shrunken House GOP caucus, a familiar role for the underestimated scrapper whose top priority will be to protect President Donald Trump's agenda and try to build the party back to retake the majority. (AP Photo/Susan Walsh)

WASHINGTON (AP) — Republican Rep. Kevin McCarthy easily won an internal party election Wednesday to take over the shrunken House GOP caucus, handing the seven-term Californian a familiar role of building the party back to a majority as well as protecting President Donald Trump’s agenda.

With current speaker Paul Ryan retiring and the House majority gone, the race for minority leader was McCarthy’s to lose. But rarely has a leader of a party that suffered a major defeat — Democrats wiped out Republicans in GOP-held suburban districts from New York to McCarthy’s own backyard — been so handily rewarded.

After pushing past a longshot challenge from Ohio Rep. Jim Jordan, the co-founder of the conservative House Freedom Caucus, McCarthy will be tested by Republicans on and off Capitol Hill who remain angry and divided after their midterm losses and split over how best to move forward.

“We’ll be back,” McCarthy promised, claiming a unified front for the Republican leadership team. He won by 159-43 among House Republicans.

McCarthy, who has been majority leader under Ryan, acknowledged Republicans “took a beating” in the suburbs in last week’s national elections, especially as the ranks of GOP female lawmakers plummeted from 23 to 13. The GOP side of the aisle will be made up of 90 percent white men in the new Congress — an imbalance he blamed on billionaire former New York Mayor Michael Bloomberg’s election spending to help Democrats.

Bloomberg spent more than $110 million in the midterms. Two Republican women were defeated by candidates he supported, and both were replaced by Democratic women, said spokeswoman Rachel Nagler.

McCarthy has been here before, having helped pick up the party after Republicans last lost control of the House in 2006, leading them to the 2010 tea party wave that pushed them back into the majority.

Trump, who is close to McCarthy but also friendly with Jordan, largely stayed on the sidelines in the intraparty House contest. The outcome gives the president two allies positioned to help him.

While McCarthy provides an affable face for the GOP, Jordan, the former Ohio wrestling champ and a Fox News regular, will be fighting Democrats’ investigations into Trump’s businesses and administration.

GOP Whip Steve Scalise, the Louisiana Republican who was badly wounded in last year’s congressional baseball practice shooting and unanimously won his position Wednesday, said McCarthy “knows what he needs to do.”

ADVERTISEMENT

Rounding out the GOP leadership team will be Rep. Liz Cheney of Wyoming, a daughter of former Vice President Dick Cheney, who was on hand to watch his daughter take over the No. 3 spot he held decades ago. “He told me not to screw it up,” she said.

House Democrats put off until after Thanksgiving their more prominent contest, Rep. Nancy Pelosi’s bid to regain the speaker’s gavel she held when the Democrats last had the majority.

On the other side of the Capitol, Senate Majority Leader Mitch McConnell of Kentucky won another term leading Republicans and Chuck Schumer of New York won for Democrats. Both were selected by acclamation.

Senate Republicans also welcomed the first woman to their leadership team in years, Iowa Sen. Joni Ernst, as they sought to address the optics of the GOP side of the aisle being dominated by men. Ernst called her selection “a great honor.”

In the House, Jordan and McCarthy shook hands after a testy two days of closed-door sessions, according to lawmakers in the room for Wednesday’s voting. Rep. Mark Meadows of North Carolina, the Freedom Caucus chairman, called it a “gentlemanly” debate.

But the friendly talk papers over the infighting between the GOP’s conservative and moderate flanks as lawmakers dole out blame after the midterm election losses that handed House Democrats the majority.

Many Republicans side with Jordan’s theory, which is that Republicans, despite a GOP monopoly on power in Washington, lost because they didn’t “do what we said” — including delivering Trump’s priority to build the border wall with Mexico.

McCarthy made that argument, too, lawmakers said, suggesting that those who lost their races — or came close to losing — didn’t work hard enough to sell the GOP’s message. At one point, ads featuring McCarthy were running promoting Trump’s border wall.

GOP Rep. Peter King of New York rose to object, saying his view was that Republicans lost ground over the GOP tax cuts that reduced deductions for some filers. The harsh immigration rhetoric that turned off suburban voters didn’t help, he said.

“We used to own the suburbs,” King said. “Now we’re down to rural voters.”

McCarthy relishes an underdog role, which channels the spirit of his hometown of Bakersfield in California’s Central Valley, where he worked his way up from a congressional aide.

“We think he’s absolutely our best political strategist, our best fundraiser, our best recruiter,” said Rep. Tom Cole of Oklahoma. “And that’s job No. 1 in getting back to the majority.”

But after eight years of GOP control, the tea party class of 2010 is long gone. So too are the “Young Guns” — former leader Eric Cantor and outgoing Speaker Ryan — who penned that strategy. Voters largely panned the party’s latest signature accomplishment, Trump’s tax cuts, and Republicans have all but abandoned the tea party promises to cut the deficit and repeal and replace former President Barack Obama’s health care law.

Among those who opposed McCarthy, Rep. Thomas Massie of Kentucky, summed up his view of the Californian’s strengths and weaknesses. “He’s a savant at making friends,” Massie said. “Running the country, probably not so much.”

___

Associated Press writers Matthew Daly, Kevin Freking, Laurie Kellman and Alan Fram in Washington contributed to this report.

___

Follow on Twitter at https://twitter.com/lisamascaro and AP’s political coverage at https://apnews.com/apf-politics