Embattled District of Columbia mayor Vincent Gray was defeated in the Democratic primary Tuesday by Councilmember Muriel Bowser.
Gray conceded defeat shortly after midnight Wednesday. Bowser captured 44 percent of the vote to Gray's 32 percent, with Councilmember Tommy Wells a distant third at 13 percent. The reporting of some results was delayed by what election officials said were problems with electronic voting machines.
The primary result in the heavily Democratic city has traditionally decided the race.
Bowser pledged to unite the party following the divisive primary campaign.
"The residents of the nation's capital have always elected a Democratic mayor, a Democratic president, and in big numbers, and we're going to do it again in November," she said to supporters gathered at a charter school in southeast Washington.
In his concession speech, Gray, who is under an ethics cloud and faces the possibility of criminal charges, told a subdued crowd at a downtown hotel that he would continue working hard during the last nine months of his term.
"The amount of work that we've done over the last three-and-a-quarter years has been nothing short of phenomenal," the mayor said.
Gray was elected mayor in 2010 after he defeated then-mayoral incumbent Adrian Fenty in the Democratic primary by tapping into dissatisfaction with the city's direction among its African-American residents. But a series of guilty pleas in federal court have revealed that top aides to Gray broke the law to help him get elected. Three weeks ago, prosecutors said the mayor knew about an illegal, $668,000 slush fund that aided his get-out-the-vote efforts.
Gray has not been charged and insists he did nothing wrong. His attorney has said he is preparing for a possible indictment.
Many Gray supporters view U.S. Attorney Ronald Machen's office with suspicion and said it was unfair for prosecutors to accuse the mayor of wrongdoing without charging him with a crime.
"I'm disappointed of course about the election in 2010, but I'm also disappointed with that U.S. Attorney for taking so long to do what he's going to do," said Sandra Humphrey, who voted for Gray.
Bowser and her supporters had argued that Gray was distracted by the possibility of criminal charges against him and could no longer govern the city effectively. Bowser's opponents said she lacked the experience to be mayor, saying her legislative record is skimpy. Her most significant accomplishment on the council was the creation of an independent ethics board able to punish officials for violations. The board has found wrongdoing by three members of the 13-person council.
According to the District of Columbia Board of Elections and Ethics, just over 83,000 of the city's 369,037 registered voters cast a ballot, a turnout rate of 22.5 percent. Many observers blamed the low turnout on the unusually early April primary, which they said dampened voter enthusiasm and made campaigning difficult. Others blamed the candidates for failing to inspire.
"I voted for Bowser. I held my nose," said Eugene Gill, 52, a retired city worker. "All of them are terrible."
Joan Gladden, 65, said she voted for Gray in 2010 and would have stuck with him if not for the allegations of corruption.
"Do we have any honest politicians left?" she said.
November's general election promises to be unusually interesting, with independent Councilmember David Catania challenging the primary winner. Catania, a former Republican who has championed progressive causes since leaving the party in 2004, spent the day shaking voters' hands at several precincts.
"No one wants to vote today," he said. "It's a little bit disheartening to see the light turnout. It's a function of people losing faith in the system."
The Associated Press contributed to this report.