Mark D. Obenshain, the Republican candidate for attorney general of Virginia, conceded the race on Wednesday, halting a recount and handing Democrats possession of the top three statewide offices for the first time since 1993.

Mr. Obenshain requested the recount after losing last month to his Democratic rival, Mark R. Herring, by a razor-thin 165 votes out of 2.2 million cast.

But since the recount began Monday, Mr. Herring extended his lead to more than 810 votes, and Mr. Obenshain acknowledged that his bid was lost. “I’m confident the final total is going to show Mark Herring ahead,” Mr. Obenshain said at a news conference in Richmond.