OMAHA, Neb. (AP) — Jim Pillen, a University of Nebraska regent backed by the state’s outgoing governor, won a crowded Republican primary for governor on Tuesday over a candidate endorsed by Donald Trump, dealing the former president a notable loss as he tries to shape the GOP’s future.

Pillen, a hog farm owner and veterinarian, defeated eight challengers, including Charles Herbster, a businessman accused late in the campaign of groping young women, and Brett Lindstrom, a state senator and Omaha financial adviser who was generally viewed as a more moderate choice.

University of Nebraska Regent Jim Pillen, center, gives a thumbs up to a wave of applause as he is named the winner of the Nebraska Republican gubernatorial primary during an election night party at the Embassy Suites on Tuesday, May 10, 2022, in Lincoln, Neb. (Kenneth Ferriera/Lincoln Journal Star via AP)

While Trump-endorsed candidates won primary races in West Virginia for the U.S. House on Tuesday, the statewide loss in Nebraska was a setback for Trump. He has issued hundreds of endorsements and staged his signature campaign-style rallies in support of his preferred candidates, including Herbster, all in an effort to bend the GOP in his direction ahead of another possible presidential run in 2024.

Herbster’s loss raises the stakes on other high-profile races this month in Pennsylvania and Georgia, where Trump has also intervened in campaigns.

In this Republican stronghold, Pillen will be a strong favorite in November’s general election against his Democratic opponent, state Sen. Carol Blood. Nebraska hasn’t elected a Democrat as governor since 1994.

Pillen was endorsed by many top GOP leaders in the state, including Gov. Pete Ricketts, former Gov. Kay Orr, and renowned former University of Nebraska football coach and congressman Tom Osborne. Ricketts was prevented by term limits from running again.

In Nebraska, the allegations against Herbster, a longtime supporter of Trump, didn’t stop the former president from holding a rally with him earlier this month.

“I really think he’s going to do just a fantastic job, and if I didn’t feel that, I wouldn’t be here,” Trump said at the rally at a racetrack outside Omaha.

In a story last month, the Nebraska Examiner interviewed six women who claimed Herbster had groped their buttocks, outside of their clothes, during political events or beauty pageants. A seventh woman said Herbster once cornered her privately and kissed her forcibly.

One of the accusers, Republican state Sen. Julie Slama, said Herbster reached up her skirt and touched her inappropriately at the Douglas County Republican Party’s annual Elephant Remembers dinner in 2019. The Associated Press does not typically identify people who say they are victims of sexual assault unless they choose to come forward publicly, as Slama has done.

Herbster filed a defamation lawsuit against Slama, saying she falsely accused him in an effort to derail his campaign. Slama responded with a countersuit against Herbster, alleging sexual battery.

Herbster has suggested in television ads that Pillen and Ricketts conspired with Slama to falsely accuse him of sexual assault — allegations the three deny.

Some voters said the allegations didn’t dissuade them from backing Herbster.

As she voted at an elementary school in northwest Omaha on Tuesday, Joann Kotan said she was “upset by the stories, but I don’t know if I believe them.” Ultimately, the 74-year-old said, she voted for Herbster “because President Trump recommended him.”

Lindstrom faced a barrage of attacks as well, with third-party television ads funded by Ricketts that portray him as too liberal for the conservative state. One digitally altered ad shows Lindstrom standing in front of a rainbow flag with a coronavirus mask superimposed over his face. A mail ad notes that Lindstrom was endorsed by U.S. Rep. Brad Ashford, a moderate Republican-turned-Democrat who died last month of brain cancer.

But Devon Leesley said he backed the 41-year-old Lindstrom because “it’s time to hand over the politics to the next generation.” Pillen and Herbster are both in their 60s.

The 45-year-old Leesley, who lives in Omaha, said he didn’t pay much attention to the various endorsements in the race.

“I don’t trust any politician talking about any other politician. It’s all dirt,” he said. “We would never vote for anybody if we listened to their opponent.”

Carol Bruning, 59, of Omaha, said she went into Election Day debating between Pillen and Lindstrom, but went with Pillen because of his age and experience. She said she liked that Ricketts and Osborne endorsed Pillen. The fact that Trump endorsed Herbster may have even been a little bit of a turn-off at this point, Bruning said, even though she had voted for Trump.

The allegations against Herbster weren’t much of a factor, she said. “You don’t know what to believe. That’s the hard part,” Bruning said.

Nebraska Secretary of State Bob Evnen, a Republican who also won renomination on Tuesday, predicted that 35% of registered voters would cast ballots in the primary, the highest percentage since 2006, based on what he had seen so far.

Nebraska Republicans and Democrats also picked their candidates for the seat previously held by Republican U.S. Rep. Jeff Fortenberry, who resigned from office and ended his reelection bid in March after he was convicted of federal corruption charges.

State Sen. Mike Flood, a former speaker of the Nebraska Legislature, won the Republican nomination, while state Sen. Patty Pansing Brooks won the Democratic nod. Flood will enter the race as a strong favorite in the Republican-heavy 1st Congressional District, which includes Lincoln, small towns and a large swath of eastern Nebraska farmland.

Despite Trump’s loss in the Nebraska governor’s race, his influence proved decisive in West Virginia, which also held primary elections Tuesday. In a race pitting two Republican incumbents against each other, Trump’s candidate, Rep. Alex Mooney, defeated Rep. David McKinley, who had angered Trump by voting for President Joe Biden’s bipartisan infrastructure package and the creation of the House committee investigating the Jan. 6 attack on the U.S. Capitol.

See the full election results here.