From the moment Georgia Secretary of State Brad Raffensperger defied Donald Trump, his chances of reelection were in serious doubt.

How could the man who famously refused the president’s demands to “find” more votes and overturn the 2020 election results win a Republican primary against a Trump-endorsed challenger?

Not only did Raffensperger survive, he won the primary outright without a runoff by earning a majority of the vote against four candidates, including Trump’s choice, U.S. Rep. Jody Hice.

Instead of bending to Trump, Raffensperger campaigned as a principled conservative, an engineer and small businessman who took his case directly to voters at events across the state. His message worked.

“What I have found is that every Georgian wants safe and secure elections with the right balance of accessibility with security,” Raffensperger told reporters on election night. “If you don’t understand what happened in the election of 2020, here’s what happened ― 28,000 Georgians skipped the presidential race and yet voted down-ballot in other races.”

Raffensperger advanced to the general election, leaving Democrats as the ones forced into a runoff because no candidate won a majority Tuesday. Raffensperger will face the winner of a June 21 Democratic runoff between state Rep. Bee Nguyen and former state Rep. Dee Dawkins-Haigler.

Hice, who objected to certifying Georgia’s electoral votes in Congress on Jan. 6, 2021, tried to pin the blame for Republican losses on Raffensperger.

He criticized Raffensperger’s decisions during the coronavirus pandemic to mail absentee ballot applications to all active voters, allow ballot drop boxes and settle a lawsuit over standards for absentee ballot signature verification.

Hice’s attacks didn’t stick.

“I am proud of the race we ran and I still believe that renewing integrity in our elections is absolutely critical,” Hice wrote in a message to his supporters Wednesday.

Making trips to Rotary Clubs, local chambers of commerce and county Republican Party meetings, Raffensperger said he put 40,000 miles on his truck traveling across Georgia to make his case to voters.

Raffensperger provided explanations for the 2020 election: No, there weren’t ballots stuffed in suitcases at State Farm Arena. No, there weren’t hordes of dead voters (there were four). Yes, tens of thousands of Republicans decided not to vote for Trump.

“He took the heat. He went from the guy nobody wanted to have lunch with to the guy people voted for,” conservative commentator and radio host Martha Zoller said. “He defended his position and acknowledged things that needed to be fixed, and he fixed them.”

His candidacy got help from Democratic voters who decided to cast Republican ballots so they could oppose Trump’s slate, including Hice. Georgia has open primaries, meaning any registered voter can choose to participate in either party’s primary election.

Going into election day, 7% of early voters in this year’s Republican primary had voted in the Democratic primary two years ago, according to state election data analyzed by The Atlanta Journal-Constitution.

One crossover voter, Jonathan Herman, said it was important to him to use a Republican ballot to oppose Trump’s agenda in the primary — and then vote for Democrats again in the general election in November.

“Raffensperger has demonstrated that, for all of the concerns I have about him as secretary of state, at least he was a stubborn constitutionalist who wanted to make sure the election was managed fairly,” said Herman, a retired Georgia State University religious studies professor who writes a political blog, Herman’s Toteboard. “Hice seemed to suggest that he’ll find a way to make his side win, and that’s not what you want a fair arbiter of elections to be doing.”

Another factor in Raffensperger’s victory is that Republican voters in Georgia aren’t always rigidly loyal to Trump’s endorsed candidates, said former state Rep. Buzz Brockway, who lost to Raffensperger in the race for secretary of state in 2018.

None of Trump’s four endorsed candidates seeking to unseat incumbent Republicans were successful in Georgia. Four candidates whom Trump endorsed in open races either won outright or advanced to runoffs.

“The people making the most noise are the activists, but there weren’t enough of them to bring down Brad Raffensperger,” Brockway said. “It’s not enough to say that you’re endorsed by Trump. As time went on and there’s distance between now and the 2020 election, people are ready to move on.”

The Associated Press contributed to this article.