PHOENIX — Arizona state Senate President Andy Biggs has won a recount in a razor-thin Republican primary in a suburban Phoenix congressional district.

A judge certified Friday that Biggs won by 27 votes after election officials did a new tally this week.

Heading into the recount, Biggs previously led former dot-com executive Christine Jones by 16 votes out of more than 85,000 cast. Jones had been waging several legal battles to get more votes counted that she believes would tip the race in her favor.

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.