A federal candidate backed by former President Donald J. Trump won a contested primary for the second consecutive week on Tuesday, as Representative Alex Mooney resoundingly defeated Representative David McKinley in West Virginia in the first incumbent-vs.-incumbent primary race of 2022.

But Mr. Trump’s endorsement scorecard took a hit in Nebraska, where his preferred candidate for governor, Charles W. Herbster, lost in a three-way race to Jim Pillen, a University of Nebraska regent who had the backing of the departing Gov. Pete Ricketts.

Here are four takeaways from primary night in Nebraska and West Virginia:

On paper, West Virginia’s new Second Congressional District should have given an advantage to Mr. McKinley, 75, who had previously represented a larger area of its territory as he sought a seventh term. But Mr. Mooney, 50, who once led the Republican Party in neighboring Maryland, nonetheless romped across nearly the entire district, with the exception of the state’s northern panhandle, on Tuesday.

Mr. Trump’s endorsement is widely seen as powering the Mooney campaign in one of the states where the former president has been most popular.

Throughout the race, Mr. Mooney slashed at Mr. McKinley as a “RINO” — “Republican in name only” — and took aim at some of his aisle-crossing votes, including for the bipartisan infrastructure bill that passed Congress last year and the bipartisan legislation to create the commission examining the Jan. 6, 2021, attack on the Capitol.Mr. Trump sided with Mr. Mooney early on, and invited him to appear alongside him at a rally in Pennsylvania last week. There, Mr. Trump joked that Mr. Mooney should defeat Mr. McKinley “easily.” He largely did, with landslide-level margins topping 70 percent in some of the eastern counties that border Maryland.

The race comes a week after Mr. Trump helped J.D. Vance win an expensive Ohio Senate primary, and it again showed his influence when endorsing House and Senate candidates.

President Biden was not on the ballot in the West Virginia House race. But his belief that voters will reward members of Congress who put partisanship aside to get things done took another blow.

Mr. McKinley seemingly fit very much in the long West Virginia tradition of bring-home-the-bacon lawmakers (See: Robert C. Byrd).

Mr. McKinley had campaigned alongside Gov. Jim Justice, a Democrat-turned-Republican, and turned to Senator Joe Manchin III, a Democrat, in the closing stretch as a pitchman.

But Republican primary voters were in no mood for compromise.

“Liberal David McKinley sided with Biden’s trillion-dollar spending spree,” said one Mooney ad that began with the narrator saying he had a “breaking MAGA alert.”

On Tuesday afternoon, Mr. Biden delivered a speech acknowledging that he had miscalculated in his belief that Trump-style Republicanism would fade with Mr. Trump’s departure. “I never expected — let me say — let me say this carefully: I never expected the Ultra-MAGA Republicans, who seem to control the Republican Party now, to have been able to control the Republican Party,” Mr. Biden said.

On Tuesday evening, voters in West Virginia reaffirmed where the power in the party lies.

Mr. Herbster had tried to make the Nebraska governor’s primary a referendum on Mr. Trump. He called it “a proxy war between the entire Republican establishment” and the former president. He cited Mr. Trump at every opportunity. He appeared with him at a rally.

But the race became about Mr. Herbster himself, after he faced accusations of groping and unwanted contact from multiple women in the final weeks of the race.

Voters instead went with Mr. Pillen, a former University of Nebraska football player, who had also run as a conservative choice with the backing of the departing governor. A third candidate, Brett Lindstrom, a state senator from outside Omaha, had campaigned for support from the more moderate faction of the party.

Mr. Herbster becomes the first Trump-endorsed candidate to lose in a 2022 primary — but most likely not the last.

Mr. Trump’s choices for House and Senate so far in 2022 have succeeded (Mr. Mooney and Mr. Vance). His first pick in a governor’s race has stumbled. In the next two weeks, Mr. Trump is backing two more Republican candidates for governor, in Idaho and Georgia, both of whom are challenging Republican incumbents and neither of whom is favored to win.

Meanwhile, Mr. Trump’s picks for Senate in North Carolina and Pennsylvania both have a chance to win in next week’s primaries.

The gap between the politics of American cities and rural areas isn’t just an issue between the Republican and Democratic Parties — it is an issue within the Republican Party, as well.

For the second consecutive week (after the Senate race in Ohio), the results map showed that urban areas remain a stronghold for more moderate and traditional Republican voters — and that rural areas are extremely hostile to that brand of politics.

In Ohio, State Senator Matt Dolan, who did not pursue Mr. Trump’s backing, succeeded in the cities of Cleveland and Columbus but was overwhelmed almost everywhere else.

In Nebraska, Mr. Lindstrom, another Republican state senator, performed strongest in Douglas County, home to Omaha, while getting obliterated in much of the rest of the state. In more rural parts of Nebraska, Mr. Lindstrom rarely topped 20 percent of the vote and in some places sank to single digits.

In Cherry County, with most of the vote counted, Mr. Lindstrom was below 7 percent; the Trump-backed Mr. Herbster, meanwhile, was above 50 percent — even en route to a statewide defeat.

It was Mr. Pillen who was winning, finishing in a virtual tie with Mr. Lindstrom in Lancaster County, home to Lincoln and the state’s second-biggest voter hub, while outpacing both of his rivals throughout most of the rest of the state.