Nielsen was in third place on the first release of votes Aug. 4 but eventually moved to the front in the final count. Peterson (34.4%) finished second to earn a runoff spot with Lynne King Smith (30.67%) trailing.
Nielsen said he was encouraged by the results.
"I wasn't really surprised by the late surge," he said. "Here is why: I had a lot of people tell me that they were going to vote that way. And when I say that way, I mean they had gotten their mail-in ballots and filled them out and they were going to walk those into the polling places. So I knew those were going to be the last ones to be counted."
Peterson also indicated she was not surprised at the outcome.
"I did not expect anyone to win the primary because of three candidates being in the primary," she said. "I expected a runoff all along."
A candidate needed 50% plus one vote to avoid a November runoff in the mayor’s election. Second place would get a runoff spot if a winner is not produced in this election.
Gilbert residents cast a record 57,634 votes in the primary, according to results from the Maricopa County Elections Department.
In the four-year term race, because there are two seats available, candidates needed to get 25% for election, and Vice Mayor Scott Anderson (28.74%) and former Gilbert Chamber of Commerce President Kathy Tilque (28.68%) cleared that hurdle to win election with Gilbert Redevelopment Commission Chairman Tyler Hudgins (22.49%) and Bus Obayomi (19.91%) trailing.
"I feel good about it," Anderson said in reaction. "It's a way of measuring whether or not you're doing the right thing in the community if they re-elect you. That's how I look at it."
For Tilque, it means her work in the community continues in a new role.
"I'm really excited and looking forward to continuing to serve the town of Gilbert and the businesses and residents," she said.
The race for the two-year seat, which was neck and neck early, widened some later with Laurin Hendrix (51.2%), a Maricopa County Community College Board member, holding a slight lead over appointed incumbent Bill Spence (48.46%).
"I am happy that the election is over, and I look forward to serving on the council," Hendrix said by email. "With the mayor’s resignation, more than half of the council has resigned, and there may only be two people with experience serving on the council in January. This places tremendous power in the hand of unelected staff until the council members get up to speed."
Hendrix will fill the final two years of Eddie Cook’s term. Cook left the council when he was appointed Maricopa County assessor.
In his bid to retain the assessor's seat, Cook (52.44%) beat Rodney Glassman (47.16%) for the Republican nomination.
"I haven't come off the roof yet as to how happy we are," he said. "We are honored and humbled."
Another former council member, Jordan Ray, won the four-person race for the Republican nomination for Justice of the Peace of the Highland Justice Court. Ray won 36.71% of the vote, with the next competitor, Ken Sampson, at 31.17%. No Democrats ran, and Ray will be uncontested in the general election.
Ray said he was "cautiously optimistic" after early returns. He did note that the election-day polls were "unbelievably busy" in Gilbert for in-person balloting.
Gilbert Proposition 430, the town's 10-year General Plan, achieved overwhelming support, winning 80.29% yes votes. Among other things, the plan lays out Gilbert's principles for managing growth over the next 10 years.
Contested county races
Longtime county Sheriff Joe Arpaio, who lost re-election to his office in 2016, lost his bid to regain his old job after being neck and neck early with his former deputy, Jerry Sheridan, for the Republican nomination. Sheridan had 37.15% of the vote to Arpaio's 35.69%. The winner would face off with Democrat Paul Penzone, who ended Arpaio's long run as sheriff, which lasted from 1993-2017.
Stephen Richer won the Republican nomination for county recorder with 57.31% of the vote against Clair Van Steenwyk (42.25%).
Former Legislator John Allen (56.84%) beat incumbent Royce Flora (42.73%) for the Republican nomination for county treasurer
Julie Gunnigle won the Democratic nomination for county attorney with 59.34% of the vote against Will Knight (22.48%) and Bob McWhirter (17.83%).
Sam Goodman (74.21%) easily beat Warde Nichols (25.44%) for the Justice of the Peace position in the San Tan Justice Court Justice of the Peace spot, while Steve Allen (57.38%) was beating Warren Solomon (42.38%) for constable of that justice court.
Contested federal races
U.S. Sen. Martha McSally easily won the Republican nomination for her seat against Daniel McCarthy, who appeared on the ballot as "Demand" Daniel McCarthy. McSally, who garnered 76.04% of the vote against McCarthy's 23.05%, will face Democrat Mark Kelly in the general election bid to retain her seat.
Joan Greene won the Democratic nomination for U.S. Congressional District 5 with 49.82% of the vote, ahead of Javier Ramos (39.21%) and Jon Ireland (10.54%). Greene faces Republican incumbent Andy Biggs in the general election.