PHOENIX — Arizona state Senate President Andy Biggs emerged the winner Friday in a razor-thin Republican primary for a suburban Phoenix congressional district, prevailing by 27 votes.

Heading into the new tally this week, Biggs had led former dot-com executive Christine Jones by 16 votes out of more than 85,000 cast in Arizona’s 5th Congressional District primary. Jones had been waging several legal battles to get more votes counted that she believed would have tipped the race in her favor.

Jones conceded the race and congratulated Biggs “on a hard fought victory” after a judge announced the certified results during a court hearing.

“Obviously, the results today show that Mr. Biggs won and I’m a supporter of Republicans in general,” Jones said outside the courtroom. “So, I’m going just support him and we’re going to move on to the general election and hope that he wins and he’s victorious.”

The entire ordeal should also be a reminder that “unequivocally, every single vote matters,” she added.

Biggs did not attend the hearing but said he was “humbled” by his opponent’s decision to stop contesting the race.

“Running for office is a daunting task and requires hard work and determination,” Biggs said in a statement. “Christine demonstrated those qualities and more throughout the campaign.”

Biggs will almost certainly be the next congressman in the heavily Republican district represented by retiring GOP Rep. Matt Salmon.

Biggs had the backing of the party establishment, while Jones cast herself as an outsider in a field of career politicians. She pumped more than $1.6 million of her own money into the race.

Before the recount began Tuesday, the former GoDaddy executive made last-ditch efforts to challenge how ballots were processed in the hopes that more votes could be included.

Jones’ campaign filed a lawsuit and motion last week seeking a court order that would postpone county elections’ certification of its results.

Her camp says at least 300 eligible voters cast ballots that were not counted and that some improperly identified people may have been allowed to vote.

Judge Joshua Rogers, who presided over Friday’s hearing, previously struck down Jones’ request for a temporary restraining order but ruled that 18 uncounted ballots had to be tallied.

Those voters cast provisional ballots at incorrect polling places during the primary and were not told that their votes would not be counted, Rogers said. That led to Biggs’ 16-vote lead.

Jones’ attorneys also pushed for the state’s top prosecutor to investigate allegations of anomalies in the tabulation of early ballots.

Her lawyers wrote a letter Monday to state Attorney General Mark Brnovich and Arizona Secretary of State Michele Reagan, saying nearly 600 ballots cast in the race contained votes for too many candidates.

The lawyers urged an investigation into whether there had been problems with machines. They also questioned “an unexplained drop in ballots tabulated from certain Chandler precincts” on Sept. 2 “including an entire region of Chandler that appears to be missing.”

Attorneys for Biggs had accused Jones of creating chaos and disruption in an attempt to win the race and the open seat for the heavily Republican district in southeastern Phoenix suburbs, including Gilbert and parts of Chandler and Mesa.

Salmon had endorsed Biggs last February, seemingly paving the way for a smooth primary victory.

Jones, a candidate for governor in 2014, touted herself as a conservative business leader with a platform focused on immigration, fiscal and foreign policy.