(CNN) - Republican state Sen. Mark Obenshain conceded to Democrat Mark Herring on Wednesday in the disputed race for Virginia Attorney General.
Obenshain made the decision with a recount set to conclude.
It marked the first time since 1989 that Democrats have officially swept the top three statewide offices in Virginia.
"The recount is almost over and in this contest for Attorney General that, frankly, I was starting to think was never going to end. It's become apparent that our campaign is going to come up a few votes short," he said at a news conference.
Democrats now control the offices of Governor, Lieutenant Governor and Attorney General.
Former Democratic National Committee Chairman Terry McAuliffe won the gubernatorial race and Democrat Ralph Northam was elected Lieutenant Governor.
Obenshain and Herring, also a state Senator, were in a virtual dead heat on Election Day.
Obenshain later requested a recount - as allowed under Virginia law - with results showing him trailing Herring by about .007%, the closest margin in a statewide race in the Old Dominion's history.
The recount began on Monday and was set to conclude at the end of the week.
Herring's win will prompt a special election in the state Senate, which is currently split evenly, 20-20, between Republicans and Democrats.
McAuliffe congratulated Herring on his victory. He also praised Obenshain's "graceful concession."
"I would also like to congratulate Senator Mark Obenshain on a hard fought campaign and for the professional manner in which he has approached the recount process."
CNN's Ashley Killough and Paul Steinhauser contributed to this report.