In a campaign waged while Gray was fighting off allegations of scandal from his 2010 victory, Bowser emerged from a pack of eight candidates. She will face Independent Councilmember David A. Catania in November's general election.
Bowser won the nomination with only about 40,000 votes in a city with about 370,000 registered voters. Councilmember Tommy Wells placed third.
A Washington Post poll released prior to the election showed a narrowing gap in the race, with Bowser surging ahead of the pack after trailing Gray — with everybody else in the race — by double-digits just months ago.
Gray's problems were centered on his 2010 victory.
An ongoing federal investigation into his campaign of four years ago has already garnered one guilty plea, from businessman Jeffrey E. Thompson. He pleaded guilty to illicit campaign funding, including on behalf of Gray’s 2010 campaign. Gray has denied any wrongdoing.
Mayoral contests in the District typically end with the Democratic primary but this year the nominee face councilman David A. Catania, an Independent, in November's general election.