RALElGH, N.C. (AP) — U.S. Rep. Ted Budd and former state Supreme Court Chief Justice Cheri Beasley won their respective Senate primaries on Tuesday, setting up a fall election matchup that should again test former President Donald Trump’s influence in North Carolina.

Budd won the 14-candidate Republican primary over former Gov. Pat McCrory and U.S. Rep. Mark Walker, while Beasley had entered Tuesday as the frontrunner for the Democratic nomination, which 11 people sought. Current GOP U.S. Sen. Richard Burr is retiring.

WNCT election results

North Carolina election results

Their election victories came as North Carolina voters whittled down Democratic and Republican candidates seeking to serve on Capitol Hill, in the General Assembly and on the judicial bench.

Trump, who narrowly won the state’s electoral votes in 2016 and 2020, gave his endorsement to Budd nearly a year ago and benefitted from millions of dollars spent by the Club for Growth Action super PAC used to praise him and brand McCrory as too liberal.

McCrory and Walker criticized Budd for failing to participate in televised debates and accused the super PAC of trying to buy an election for Budd.

McCrory, a moderate within the state GOP, signed laws while governor that cut taxes and extended abortion waiting periods to 72 hours. He’s best known nationally for signing a “bathroom bill” that restricted access for transgender people in 2016 and cost the state billions.

Beasley’s path to the nomination widened after two rivals left the race last fall. Beasley, who would be the first Black senator elected from North Carolina, has consistently been the largest fundraiser in both primary fields.

Voters also picked nominees Tuesday for scores of county positions. Many towns and cities also held elections postponed last year because of redistricting delays.

U.S. HOUSE

Primaries were held in 13 of the 14 North Carolina U.S. House districts. Seven of the 11 incumbents seeking reelection faced challenges within their own party.

The member facing the toughest fight was Rep. Madison Cawthorn, a 26-year-old, first-term congressman. He conceded the 11th District GOP primary late Tuesday to state Sen. Chuck Edwards, who had a narrow lead. The AP had not called the race.

A number of publicly disclosed personal and political blunders led top state Republican leaders to turn against Cawthorn and support Edwards.

LGBTQ activist and local elected official Jasmine Beach-Ferrara won the Democratic nomination for the 11th District.

Robust primaries were held for open seats as Democratic Reps. David Price and G.K. Butterfield plan to retire at year’s end.

In the heavily liberal 4th District, state Sen. Valerie Foushee won the Democratic nomination to succeed Price in an eight-way race that included Durham County Commissioner Nida Allam and former “American Idol” runner-up Clay Aiken.

In Butterfield’s northeastern 1st District, state Sen. Don Davis won the Democratic primary, while the Republican field included 2020 nominee Sandy Smith and Rocky Mount Mayor Sandy Roberson.

In the open 13th District, Trump-backed candidate Bo Hines, Smithfield attorney Kelly Daughtry and former Rep. Renee Ellmers were among the eight Republican primary candidates. The five-person Democratic primary in the 13th resulted in a win for state Sen. Wiley Nickel from Wake County.

GENERAL ASSEMBLY

Redistricting in rural or slow-growth areas meant four pairs of Republicans are competing against each other in General Assembly primaries.

The top race among “double-bunked” incumbents was between veteran Sens. Deanna Ballard of Watauga County and Ralph Hise of Mitchell County, both who chair important chamber committees.

In the northeast, Sens. Norm Sanderson of Pamlico County and Bill Steinburg of Chowan County were seeking the same 1st District seat.

In the House, seven-term Rep. Jamie Boles and first-term Rep. Ben Moss were running in the Sandhills-area district. And Reps. Jake Johnson of Polk County and David Rogers of Rutherford County were running for the same seat.

The most intriguing legislative race may be for a Senate seat in Cumberland County held by Democratic Sen. Kirk DeViere.

Democratic Gov. Roy Cooper endorsed DeViere’s challenger in Fayetteville City Council member Val Applewhite. DeViere has been accused of getting too comfortable with the GOP, especially during last year’s budget negotiations.

APPEALS COURTS

There were three Republican appellate court primaries — one for a Supreme Court seat and two for the Court of Appeals.

The most divisive primary was between Court of Appeals Chief Judge Donna Stroud and District Court Judge Elizabeth Freshwater Smith.

Current and former GOP appellate judges have lined up on opposite sides of the race. Stroud was first elected to the intermediate-level appeals court in 2006. The winner takes on Democrat Brad Salmon in November.

Another Court of Appeals primary pitted former Industrial Commission Chairman Charlton Allen against Mecklenburg County District Court Judge Michael Stading. The winner will face Democratic incumbent Darren Jackson.

And voters chose a Republican challenger to sitting Associate Justice Sam Ervin IV, a Democrat. GOP candidates were sitting Court of Appeals Judge April Wood, Administrative Office of the Courts General Counsel Trey Allen and Greensboro attorney Victoria Prince.