Republicans who backed Donald Trump’s failed efforts to overturn the 2020 election lost key races to oversee elections in some competitive states, even as others remained positioned to take those offices in more conservative parts of the country.

Doug Mastriano, the GOP nominee for governor in Pennsylvania who was seen outside the U.S. Capitol on the day of the Jan. 6, 2021, insurrection and regularly communicated with Trump as the then-president tried to reverse his loss to Joe Biden, lost to Democrat Josh Shapiro on election night. The state’s governor appoints the secretary of state, who is the top voting official.

In Minnesota, Republican Kim Crockett, who echoed some of Trump’s lies about voting, lost her bid for secretary of state, which in most states is the position that oversees state elections. In Michigan, Democratic Secretary of State Jocelyn Benson declared victory over Kristina Karamo, a community college instructor who became one of the most prominent election conspiracists in the country. The Associated Press has not yet called the race.

And in New Mexico, Republican Audrey Trujillo, who cheered on Trump’s effort to reverse the voters’ will in 2020, lost to Democratic Secretary of State Maggie Toulouse Oliver.

Races in Arizona and Nevada, major swing states where election conspiracists were competing for secretary of state positions, remained too early to call. But many democracy advocates and Democrats were cheered by the initial tallies in political battlegrounds.

“Ultimately, some voters likely chose candidates in part because they were committed to telling the truth and protecting election integrity,” said Ben LaBolt, a Democratic strategist.

Still, in Republican-leaning states, some election conspiracists did win secretary of state offices.

Alabama voters gave the position to state Rep. Wes Allen, who backed a groundless lawsuit to overturn Biden’s victory that was dismissed by the U.S. Supreme Court. In Indiana, Diego Morales, who ousted the Republican incumbent in the party primary by repeating Trump’s election lies, won the race for secretary of state by defeating Democrat Destiny Scott Wells.

Wyoming Republican Chuck Gray, a state lawmaker who also endorsed efforts to overturn the 2020 election, was running unopposed for secretary of state.

All told, half of the 22 Republicans vying to be secretaries of states — and overseeing elections in most states — have repeated Trump’s election lies. Seven endorsed his attempts to overturn the will of the people and remain in power.

“If they win, we’re going to have someone who’s run on a platform of election denial, saying, ‘Actually, elections are only legitimate when my candidate wins,’” said David Becker, executive director of The Center for Election Innovation & Research and co-author of “The Big Truth,” a book warning of the dangers of Trump’s election lies.

In Arizona, state Rep. Mark Finchem, who attended Trump’s rally on Jan. 6, 2021, right before the violent assault on the U.S. Capitol, has made clear he would not have certified Biden’s 2020 win in that state. The GOP nominee in Nevada, Jim Marchant, made the same promise.

Republican Kristina Karamo in Michigan insisted Biden didn’t actually win her state, but he did — and by more than 154,000 votes. Less than two before this year’s midterms, Karamo sued to change Detroit’s election procedures. A judge dismissed the case on Monday, saying there was no evidence to support the allegations. On Tuesday she tweeted a post from a conspiracy website spreading more doubt on the voting in the Democratic Party’s bastion in the state.

Benson emailed supporters: “You showed the world that Michigan voters will vote for truth over lies. They will vote for facts over conspiracy theories. And they know the value of real results over empty promises.”

In Minnesota, Crockett, a lawyer who echoed some of Trump’s election lies, lost to Democratic Secretary of State Scott Simon.

“I want to thank Minnesotans today for their vote of confidence, not just in me, but in our entire democracy in Minnesota,” Simon said at a party. “Our system in Minnesota is not perfect, but it is fundamentally fair, accurate, honest and secure. And you know what? People in Minnesota know it, right?”

The candidacies from election conspiracists have triggered big spending in the contests, predominantly by Democrats and their allies. Their ads pleaded for voters to think carefully before entrusting such candidates with the job of running elections.

Mastriano, for example, arranged for buses to transport people to Trump’s Jan. 6 rally in Washington, which took place just before the riot. As a candidate, Mastriano promised to appoint someone who would wipe clean the voter rolls, forcing the state’s roughly 8.8 million voters to re-register.

In Wisconsin, the state’s bipartisan elections commissions oversees elections, but some Republicans want to change that. Democratic Gov. Tony Evers has blocked bills from the GOP-controlled Legislature that would wrest control of voting away from the commission.

Evers defeated Republican Tim Michels, a businessman backed by Trump who had his own plan for making the commission friendlier to Republicans.

Many Republican secretaries of state did rebuff Trump’s efforts to overturn the 2020 election and they won primaries against challengers who questioned that outcome. The most prominent example was in Georgia, where Secretary of State Brad Raffensperger rejected Trump’s private entreaties to “find” enough votes to declare him winner of the state, which Biden ally won.

Raffensperger’s refusal infuriated Trump, who recruited a primary challenger who lost badly in the May primary. Raffensperger was up against Democratic state Sen. Bee Nguyen on Tuesday.

___

Follow the AP’s coverage of the 2022 midterm elections at https://apnews.com/hub/2022-midterm-elections. And learn more about the issues and factors at play in the midterms at https://apnews.com/hub/explaining-the-elections.