With 80 percent of Pima County and all of Cochise County reporting, Jesse Kelly claimed the Congressional District 8 Republican nomination.
Jonathan Paton, who was trailing by about 7 points, called Kelly to concede shortly before 11 p.m.
Kelly said the party and the "honorable men" in the race would be ready to unite Wednesday to focus on the November general election.
Paton, who made his concession announcement to a Republican gathering after he called Kelly, looked stunned and said he didn't want to speculate on the reasons for his loss. The campaign has been one of the best experiences of his life because he made new friends and learned a lot about the community, Paton said.
He said he's leaving public office but didn't know if it was a permanent move.
"There's a lot of unwritten chapters in everyone's life," Paton said about what he's doing next.
Kelly will face two-term incumbent Democrat Gabrielle Giffords and Libertarian Steven Stoltz in the general election.
"The voters in this district are unified to beat Gabrielle Giffords and their big-spending liberal agenda that's harming this economy," Kelly said.
Giffords told a crowd of Democrats Tuesday night she will continue to focus on getting Arizonans back to work, transforming the country's energy economy to renewable sources, protecting Social Security and securing the border.
Her campaign has already prominently featured these issues, though she didn't have a primary opponent.
Throughout the campaign, Kelly has said she's out of touch with voters in the congressional district, and cited her votes for health care reform, bailouts and her record of voting with party leaders.
"We expect our congressional representative to be responsible with our dollars, and all she has given us is four years of failure," Kelly said Tuesday.
The primary hasn't been so classically divisive that Paton's supporters should have a hard time getting behind Kelly, said Barbara Norrander, professor in the School of Government and Public Policy at the University of Arizona.
"In reality, there's not a lot of difference between those two candidates on their issue positions," she said.
Paton said he will support Kelly because "we have to beat Gabrielle Giffords."
Five Republicans initially sought the nomination. Andy Goss dropped out in July, throwing his support behind Kelly. In August, Brian Miller suspended his campaign and said Paton was the only one left in the race who could beat Giffords. Both cited lack of campaign funding when they stepped out of the race.
Jay Quick ran a quiet campaign, saying he wasn't in the race to beat Giffords but to change the tone of partisan politics.
The Kelly-Paton race stayed hot until the end.
In the last week of the campaign, Paton launched an anti-Kelly television advertisement, highlighting Kelly's work for his father's construction company. Kelly is a project manager for Don Kelly Construction, which has done several infrastructure projects paid for with stimulus and earmark dollars. Kelly has consistently said he is against earmarks and the federal stimulus package.
A number of independent groups also weighed in on the race - notably including the Arizona Democratic Party. The party created a website, a social media platform and several mailings the weekend before the election. The literature implored voters not to vote for Paton, highlighting his ties to the short-term, high-interest payday lending industry.
When the announcement came that Kelly had the lead in the race, the Democrats gathered in Pima County cheered the result.
Arizonans Working Together targeted Kelly with flyers mailed to voters highlighting his construction work paid for with federal stimulus and earmark funding.
Another group, Conservatives for Congress, started its campaign efforts with an anti-Giffords platform, but shifted in August to criticizing Paton for "below the belt" attacks against Kelly for the construction work.
Kelly also kept up his message that Paton is a big-spending career politician, referencing Paton's Legislative votes on state budgets former Gov. Janet Napolitano signed.
He also continued to reference the "friend of big government" ranking Americans for Prosperity gave Paton in 2007.
Giffords mentioned the same group Tuesday night, telling Democrats Americans for Prosperity plans to air television advertisements attacking her record in the coming days.
She said she will continue to focus on bringing jobs to the district.
Kelly has a bit of a fight ahead to overcome Giffords' four years of constituent services work, which lends her to more name recognition among general election voters, Norrander said.
"How vigorous the campaign is over the next month is going to be important, particularly for the challengers, they need to make their name known," Norrander said.
But Giffords will have to fight the national anti-incumbent, anti-Democrat sentiment, said Norrander, who predicts immigration and the economy will remain the top issues in the race through November.
"There's some theories that people who come out to the polls in off-year elections are angry, so that would be a benefit to the Republican candidate because angry voters would vote against whoever is the incumbent," Norrander said.
Contact reporter Andrea Kelly at firstname.lastname@example.org or 807-7790. Reporters Rob O'Dell, Andrea Rivera and Clayton R. Norman contributed to this report.