Mark Obenshain, the Republican candidate for attorney general of Virginia, on Wednesday conceded to rival Mark Herring, after a recount of month-old ballots showed the Democrat holding a narrow but growing lead.
By bowing out, he gave Democrats the first sweep of all three statewide offices, including governor and lieutenant governor, since 1989.
Herring had previously declared victory in the attorney general's race.
But Obenshain requested a recount when the final election totals showed that Herring's margin of victory was only 165 votes, out of more than 2.2 million cast.
Under Virginia law, a losing candidate can request a recount when the margin of victory is less than 1 percent of all votes cast.
The recount, supervised by a panel of three judges, began Monday. As it continued, Herring's lead only grew.
By Tuesday, he was up by more than 800 votes, with 73 percent of the votes counted statewide.
During an afternoon press conference, Obenshain said it had become apparent to him that, "Our campaign going to come up a few votes short ... It was a vigorous and hard-fought campaign, but it's over."
Obenshain, flanked by his wife and daughter, said he had called Herring earlier in the day and had congratulated him on his victory.
Herring and Obenshain are Virginia state senators, and their race to become the state's top law enforcement officer became a nail-bitter.
Herring will succeed Republican Attorney General Ken Cuccinelli, who failed in his bid to become governor of Virginia, losing to Democrat Terry McAuliffe, a close friend of Bill and Hillary Clinton.
Herring's win reaffirmed that Virginia is no longer a reliable Republican state. Virginia also has two Democratic U.S. senators, and voters twice went for Barack Obama in presidential elections.
Although he lost the election, Obenshain said he would continue to fight for conservative values and limited government.
The final vote in the attorney general's race will not be known until the recount is completed, and the results are tabulated by the State Board of Elections.
William Hurd, an attorney representing Obenshain in the recount, said the three-judge court would then enter an order certifying that Herring is the winner.
© 2016 Thomson/Reuters. All rights reserved.