Republican Mark Brnovich has won the race to become Arizona's next attorney general.
Brnovich toppled Democrat Felecia Rotellini on Tuesday after a campaign that saw both candidates targeted with extensive TV advertising paid for by outside groups.
He said one of his first priorities in office will be securing the U.S.-Mexico border.
"From the attorney general's perspective, as a prosecutor, that starts with going after the cartels that are smuggling drugs and people into this country," he said. "It also means going after those that are involved in the sex-trafficking trade, using all the tools in our toolbox."
While the Associated Press called the race shortly before 10 p.m., Rotellini said Tuesday night that she was not ready concede until all of the votes were counted.
"There's hundreds of thousands of votes yet [to be] counted, including my own, so I want to wait until my vote is counted and other people's votes are counted, and then we'll decide whether this race is over," she said.
Both candidates have experience working in the attorney general's office. Brnovich labeled Rotellini as soft on crime and lacking courtroom experience in prosecuting criminals. Rotellini said her opponent was an ideologue more concerned with right-wing politics than the job at hand.
Brnovich beat incumbent Attorney General Tom Horne in August's Republican primary. Rotellini was unopposed in the primary.
Democrats believed they had a strong chance to win the election with Rotellini, who was narrowly defeated when she went head-to-head with Horne in the 2010 general election.
The Associated Press and Carrie Jung contributed to this report.
Updated 11/5/14 at 1:27 a.m.