D.C. Councilmember Muriel Bowser defeated Gray in Tuesday's Democratic mayoral primary, leaving Gray to serve nine months as a lame duck with potential criminal charges hanging over his head.
The defining moment of the election occurred three weeks earlier in a courtroom. Federal prosecutors say Gray knew about an illegal $668,000 slush fund that helped him defeat incumbent Adrian Fenty in 2010. Five people involved with his previous campaign have pleaded guilty to felonies and the new allegations surfaced as part of a plea deal for the businessman who provided the illegal funds.
Gray has denied all wrongdoing and has not been charged with a crime. But his attorney has said he is preparing for a possible indictment, and U.S. Attorney Ronald Machen said the charges thus far represent "the tip of the iceberg."
Bowser pounced on Gray's weakness earlier than most. She launched her campaign little more than halfway through the mayor's term, knocking on doors around the city with a determination similar to Fenty, her political mentor.
"The status quo is not good enough for us," Bowser told supporters early Wednesday. "We know that we can do better and we know we need a fresh start."
Her surge to a surprisingly easy victory coincided with the latest developments in the investigation. Incomplete results early Wednesday morning showed Bowser with 44 percent of the vote to 32 percent for Gray.
Some voters said they backed her over other Gray challengers primarily because they felt she stood the best chance of defeating him.
"It's too much. We've gone through scandals before in D.C., and we don't need any more," said Rufus Okunubi, 68, a cab driver who backed Gray in 2010, but voted for Bowser this time.
The Democratic primary winner has gone on to win every mayoral election in the district, where 75 percent of registered voters are Democrats. But Bowser will face a credible challenger this November: independent D.C. Councilmember David Catania, 46, a former Republican who has championed progressive causes since leaving the party in 2004.
In the days leading up to the primary, Gray focused his campaign on the poor, majority-black sections of the city where he defeated Fenty by huge margins, hoping that his seven challengers would split the vote. He picked up an endorsement from the most successful — and divisive — politician in the city's history, former Mayor Marion Barry, who drew criticism when he said black voters were more open-minded than whites.
Gray and Bowser are both black. The district has never elected a white mayor in 40 years of self-rule. Catania is white, as were two of Gray's other challengers.
Many Gray supporters view Machen's office with suspicion and said it was unfair for prosecutors to accuse the mayor of wrongdoing without charging him with a crime. Polls showed Gray with a comfortable lead before the latest developments in the investigation.
"He cannot convince a jury that Vince Gray is guilty," said Chuck Thies, Gray's campaign manager. "Instead, Ron Machen used propaganda to try Vince Gray in the court of public opinion in the closing weeks of this election."
Bowser, 41, worked for the local government in suburban Montgomery County, Md., and served as an elected neighborhood commissioner in the district before election to the council in 2007.
Opponents said Bowser lacks 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.
Gray, 71, led nonprofit organizations and the city's Department of Human Services before he was elected to the D.C. Council in 2004. As mayor, he's been known as a pragmatic, detail-oriented technocrat and sound manager of the city's robust finances. The district has enjoyed a surging population, a booming real estate market and relatively low violent crime.
Gray becomes the city's second consecutive one-term mayor. As with Fenty, polls showed voters turning against him even as they believe the city is headed in the right direction.
Turnout for the primary was light, and some voters said they were unimpressed with the slate of candidates. Many observers blamed the unusually early primary date for dampening enthusiasm and making campaigning difficult.
"I voted for Bowser. I held my nose," said Eugene Gill, 52, a retired city worker. "All of them are terrible."
Associated Press writers Jessica Gresko and Brett Zongker contributed to this report.
Follow Ben Nuckols on Twitter at https://twitter.com/APBenNuckols .
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.