Political newcomer and GOP-endorsed candidate Jim Schultz defeated Doug Wardlow in the Republican primary for Minnesota attorney general.

Schultz will face off this fall against Democrat Keith Ellison for the state's top legal office — a post Republicans have not held in half a century.

"Republicans are energized and feel like we need significant change in our state," Schultz, 36, said after casting his ballot Tuesday. "We feel people will rally behind our campaign, a campaign that will deliver a more free and safe Minnesota."

Wardlow, 44, of Prior Lake, had been running to the right of Schultz on key issues as he aimed for a rematch with Ellison, whom he lost to by 4 percentage points in 2018. He is general counsel for MyPillow and has worked for the conservative Christian group Alliance Defending Freedom and served one term in the Minnesota Legislature.

"I am the only America First candidate running for Attorney General!" Wardlow tweeted Tuesday after casting his ballot.

Schultz is a business and regulatory attorney from Minnetonka. He has focused on public safety on the campaign trail, saying the attorney general's office needs to do more to address rising crime. He intends to bolster the office's criminal division by cutting or shifting attorneys focused on other issues.

While Wardlow has also talked frequently about crime on the campaign trail, the two candidates' messaging has diverged on other issues, such as abortion and the 2020 election.

Schultz has said he would not use the attorney general's office to advocate for abortion-related policies. Wardlow said he would prosecute abortion providers if they break the law and would "wage war" on the Minnesota Supreme Court ruling protecting abortions.

Wardlow, unlike Schultz, has been repeating former President Donald Trump's falsehoods that the 2020 election was "stolen" as he campaigns for the attorney general's job. At the state Republican convention, MyPillow CEO and election conspiracy theorist Mike Lindell showed up to back Wardlow.

Tom Dorazio, 56, selected Schultz as he voted at Hosanna Church in Lakeville on Tuesday. He's looking for someone to oust Ellison, whom he called "terrible."

"I looked at Schultz's website and what he stood for, and it sounded good for me," Dorazio said.

Michelle MacDonald, who was voting in Rosemount, said she met Wardlow as she was running for the Minnesota Supreme Court in 2020.

"He is very interested in upholding our constitutional rights and not just stomping all over," said MacDonald, whose law license was suspended by the Minnesota Supreme Court last year over professional misconduct.

Perennial candidate Sharon Anderson was also running in the Republican primary. And in the DFL attorney general race, Ellison easily defeated Bill Dahn, another repeat candidate for various offices.

Will Brand, 66, of Minneapolis, showed up on primary day to support Ellison, among other candidates.

"I want to elect Keith Ellison any time he's running for something," Brand said. "He did such a good job orchestrating the Derek Chauvin trial."

Schultz said Tuesday he has traveled 8,000 miles over the past five weeks and expects a wave of Republicans to turnout for the midterm election. He said he plans to hold Ellison "accountable for his record and ensure we win the race, and win it decisively."

Staff writers Tim Harlow, Katie Galioto and Katelyn Vue contributed to this report.