WASHINGTON — Representative Kevin McCarthy, the House Republican leader, on Thursday endorsed Representative Liz Cheney’s G.O.P. rival for Wyoming’s sole congressional seat, taking the unusual step of intervening in a party primary to oust a onetime ally who has become the prime political target of former President Donald J. Trump.
Mr. McCarthy said he was backing Harriet Hageman, a pro-Trump candidate who has repeated the former president’s false claims that the 2020 presidential election was stolen, in a race that has become a prominent test for the Republican Party.
“I look forward to welcoming Harriet to a Republican majority next Congress, where together, we will hold the Biden administration accountable and deliver much-needed solutions for the American people,” Mr. McCarthy said in a statement. “The most successful representatives in Congress focus on the needs of their constituents.”
It was an extraordinary move for a leader who is aiming to become speaker of the House if his party wins control of Congress in November’s midterm congressional elections, and has worked to toe a fine line between his far right flank and more mainstream conservatives.
Congressional leaders rarely involve themselves in primary races against sitting members, but Mr. McCarthy’s move was the latest escalation of the Republican Party effort to exile Ms. Cheney for speaking out forcefully against Mr. Trump and participating in a House investigation of the Jan. 6 attack on the Capitol. After initially defending her, Mr. McCarthy last year led a push to strip Ms. Cheney of her No. 3 position in House Republican leadership.
In a statement, Jeremy Adler, a spokesman for Ms. Cheney, provided the verbal equivalent of an eyeroll, suggesting that Mr. McCarthy’s statement of support for Ms. Hageman was a reflection of her weakness.
“Wow, she must be really desperate,” Mr. Adler said.
Mr. McCarthy’s endorsement came about two weeks after the Republican National Committee voted to censure Ms. Cheney and Representative Adam Kinzinger, Republican of Illinois, for participating in the inquiry into the deadly riot at the Capitol. The resolution said the pair was involved in “persecution of ordinary citizens engaged in legitimate political discourse,” the party’s clearest statement to date that it considered the riot and the efforts to overturn the 2020 presidential election that fueled it defensible.
Mr. McCarthy last week defended the R.N.C., saying the committee had a right to pass its resolution.
In contrast, Senator Mitch McConnell of Kentucky, the Republican leader, castigated the party for doing so, stating that “traditionally, the view of the national party committees is that we support all members of our party, regardless of their positions on some issues.”
Key Developments in the Jan. 6 Investigation
Piecing the evidence together. President Biden is ordering the National Archives to turn over White House visitor logs to the House committee, rejecting former President Trump’s claim of executive privilege. The panel has previously discovered gaps in White House telephone logs, complicating efforts to recreate what Mr. Trump was doing during the attack.
Local news outlets played down the significance that another national endorsement might have on the contours of the Wyoming House race.
Ms. Hageman has already been endorsed by Mr. Trump and Senator Rand Paul, Republican of Kentucky. But Ms. Cheney, who has represented her state since 2017, still vastly out-raised her challenger despite being all but exiled by her party.
Ms. Cheney brought in $2 million during the last quarter, entering 2022 with nearly $5 million in cash on hand. Ms. Hageman raised $443,000last quarter and has about $380,000 cash on hand, despite the vocal backing of Mr. Trump and his family members.
But the endorsement said as much about Mr. McCarthy’s fear of alienating the former president — and the hard-right flank of his caucus — as it did about providing any meaningful boost to Ms. Hageman’s campaign. Ms. Cheney was the top House Republican who voted to impeach Mr. Trump last January, after the assault at the Capitol, and has become the leading voice of Republican opposition to his attempt to overturn the 2020 election.
Mr. McCarthy, who maintains a cordial working relationship with the former president and has tried to help shape his endorsements of House candidates ahead of the midterm elections, cannot risk alienating him if he wants to maintain the support of his diverse caucus, where fealty to Mr. Trump is critical to many members.
Mr. Trump on Thursday endorsed an effort to change Wyoming’s election laws to forbid voters from changing their party affiliation to vote in primaries after the filing deadline. The proposal is an effort to block Democrats from switching parties to vote for Ms. Cheney in the primary.
Reid J. Epstein contributed reporting.