Republican incumbent Ethan Orr has lost his re-election bid in Tucson's Legislative District 9.
Democrats state Rep. Vitoria Steele and political newcomer Randy Friese had a narrow but steady lead over Orr for the past few days. He lost the chance for a second term in the state House by 123 votes.
The race was too close to call after Election Day, with thousands of votes that still needed to be counted in Pima County.
Election officials said earlier this week counting would last through Veterans Day.
During the campaign, Democrats said they hoped Friese, who is a surgeon at the University of Arizona Medical Center, would unseat Orr and gain the Democratic Party one more seat in Southern Arizona.
Orr, a former adjunct professor at the University of Arizona, was first elected to the state Legislature in 2012.