D.C. Council member Muriel Bowser captured the Democratic nomination for D.C. mayor on Tuesday. PostTV talks to her supporters and Mayor Gray's defenders about what the city would look like under a Bowser administration. (Theresa Poulson and Gabe Silverman/The Washington Post)

D.C. Council member Muriel Bowser captured the Democratic nomination for D.C. mayor on Tuesday. PostTV talks to her supporters and Mayor Gray's defenders about what the city would look like under a Bowser administration. (Theresa Poulson and Gabe Silverman/The Washington Post)

Muriel E. Bowser, a low-key but politically canny District lawmaker, won the Democratic mayoral nomination Tuesday, emerging from a pack of challengers in a low-turnout primary to deny scandal-tarnished incumbent Vincent C. Gray a second term.

The 41-year-old D.C. Council member triumphed in the latest in a string of District elections to reveal a city unsettled over the shape of its future. Bowser’s win heralds many more months of uncertainty as she faces a substantial general-election challenger while a lame-duck Gray is left to steer the city amid the threat of federal indictment.

Bowser (D-Ward 4) moved deftly to capitalize on public doubts about Gray’s trustworthiness fueled by the still-unresolved federal corruption investigation into his 2010 campaign. Alone among seven Democratic challengers, she amassed a coalition that crossed demographic and geographic lines allowing her to outpoll Gray’s shrunken but steady base of African American voters.

The outcome of the race remained in doubt for four hours after the 8 p.m. closing of polling places as elections officials struggled with an unusually late and messy tabulation process.

For much of the evening, the campaigns and the public watched results trickle in and wondered what was going wrong at city elections headquarters downtown. Officials blamed the slow pace on poor training of election workers in the use of electronic voting machines. And the campaigns waited impatiently to know who had won.

1 of 43 Full Screen Autoplay Close April 1, 2014 Voting today Skip Ad × Bowser beats incumbent Gray to become the Democratic nominee for D.C. mayor View Photos Muriel Bowser, the seven-year D.C. Council member, won the Democratic nomination for mayor Tuesday, vanquishing incumbent Vincent C. Gray, whose quest for reelection was crippled by a federal investigation into his victorious campaign four years ago. Caption Muriel Bowser, the seven-year D.C. Council member, won the Democratic nomination for mayor Tuesday, vanquishing incumbent Vincent C. Gray, whose quest for reelection was crippled by a federal investigation into his victorious campaign four years ago. April 2, 2014 Democratic mayoral candidate Muriel Bowser speaks to reporters about her primary victory at the National Press Club. The D.C. Council member amassed a coalition that crossed demographic and geographic lines, allowing her to outpoll incumbent Vincent C. Gray’s shrunken but steady base of African American voters. Melina Mara/The Washington Post Buy Photo Wait 1 second to continue.

Tamara Robinson, a spokeswoman for the city Board of Elections, said vote counters noticed inconsistent numbers reported in several precincts, so they stopped releasing tallies until they could examine them more closely. They found that five or six machines had not been shut down correctly by poll workers, who may have been overwhelmed by the larger number of electronic machines at precincts this year.

With 89 percent of precincts reporting shortly before midnight, Bowser led Gray 44 percent to 33 percent — prompting a concession speech from the incumbent.

Gray said he intended to keep working, and “by the way, we have nine more months.”

In her subsequent victory remarks, Bowser struck a conciliatory note, reaching out to her rivals’ supporters in an appeal for party unity during a seven-month general-election campaign to come.

“It’s our job to let them know that I’ll be their mayor, too,” she said. “We’re going to earn their support. We’re going to hear their vision, and we’re going to work with them.”

The anti-Gray candidate

Election returns and voter interviews indicated that Bowser’s greatest strength may have been in attracting the anti-Gray vote. She had emerged from a field of seven challengers to run even with Gray in the most recent public polls.

While Gray, as expected, won solid majorities in the eastern half of the city, Bowser ran strongly in the western half and held her own in her home ward — where Gray sealed his victory against Adrian M. Fenty four years ago.

Voting at Shepherd Elementary School, traditionally a bellwether precinct, Phyllis Caudle-Green, 59, said she voted for Gray over Fenty but instead supported Bowser this time.

Bowser, she said, struck her as “capable and competent” and represented a rare opportunity to put a black woman in the city’s top office.

“We’re at a crossroads,” the retired investment banker said. “I just think it’s time to go in a new direction.”

Caudle-Green said she settled on Bowser only in recent weeks, after new corruption allegations were aired against Gray. “I don’t necessarily think the mayor is guilty,” she said. “I just don’t think we need that distraction.”

A historically small swath of the city decided the race, with Tuesday’s turnout appearing to rival elections in 1986 and 1998 for the lowest in a mayoral primary in 40 years of District home rule.

In part, the lower turnout reflected a new, earlier schedule for the city primaries, dictated by a federal law mandating more time between primary and general elections to expand absentee balloting.

For the first time in a generation, the heat of the Democratic mayoral race took place during the frigid winter months. Previous primary campaigns concluded in the early weeks of September, amid late-summer heat. This year, snow fell during early voting, and incessant rain soaked the final campaign weekend. But weather was not an excuse for the low turnout Tuesday, the most temperate day the city had seen in months.

“When you have an election coming out of the winter, that was odd and it wasn’t just that our voters didn’t come out, voters didn’t come out,” Gray said during his concession.

Tuesday night’s returns showed that Gray’s level of support eroded precipitously over four years. In his home, Ward 7, in 2010, Gray won 82 percent of the vote. This time, according to early returns, he could muster only 60 percent. Bowser racked up big margins west of Rock Creek Park and showed strength, if not dominance, in gentrifying areas of the city.

Many who voted Tuesday said Bowser might not have been their first choice, but they decided late in the race to vote for her as the best option to defeat Gray.

Abe Newman, 40, voted at Mount Bethel Baptist Church in the gentrifying Bloomingdale neighborhood, his 5-month-old daughter Sadie strapped to his chest.

The professor of international relations at Georgetown University said he been disappointed with what he called Gray’s “half-baked apologies” for the corruption scandal.

D.C. Council member Tommy Wells (D-Ward 6), Newman said, hewed most closely to his own views. “But I don’t think he had a chance of beating Gray. I don’t find him to be that charismatic.”

Newman said Bowser impressed him with her performance in a debate broadcast by WAMU (88.5 FM), and subsequent polls and endorsements cemented his vote.

Controversy takes a toll

Gray becomes the second consecutive D.C. mayor to lose his job after a single term, following in the footsteps of Fenty — the sharp-elbowed reformer who plucked Bowser from obscurity seven years ago, backing her to fill the D.C. Council seat he once held.

The erosion of Gray’s political support began in the earliest months of his mayoralty. A former rival candidate in 2010, Sulaimon Brown, was given a patronage job in Gray’s administration, only to be fired after questions arose about his qualifications and background. Brown then revealed he had been secretly paid by the Gray campaign to levy verbal attacks against Fenty in apparent violation of campaign finance laws.

Gray was able to keep the allegations of wrongdoing at arm’s length until July 2012, when it became clear that Brown’s revelations had opened a window into a much larger corruption scheme.

Federal prosecutors revealed that Gray, 71, had benefited from more than $650,000 of secret spending — again, in apparent violation of campaign finance laws — from businessman Jeffrey E. Thompson, the city’s largest contractor, whose health-care firm did more than $300 million of business with the city each year.

For a year and a half, the allegations did not touch Gray directly, and the mayor maintained he did nothing wrong as he went about his duties, touting rising school test scores, a declining unemployment rate and a proliferation of construction cranes.

For months last year, he declined to say whether he would seek a second term — surprising many political observers and the handful of candidates who had emerged when he entered the race just after Thanksgiving, weeks before a petition deadline.

Bowser modeled her campaign on Fenty’s 2006 playbook: getting an early start by becoming the first to formally launch her campaign and putting a premium on direct voter contact through neighborhood canvassing and intimate meet-and-greets. Her campaign pitch, like Fenty’s, was rooted more in energy and responsiveness than specific policy proposals or blockbuster projects.

Her campaign team also looked familiar — sharing a campaign chairman, chief strategist and key fundraisers with Fenty’s mayoral bids. They embarked on a plan to position Bowser as the inevitable alternative to Gray, the candidate with the broadest appeal and best chance to unseat the wounded incumbent — an impression Bowser built through dominant fundraising, strong showings in closely watched straw polls and an anodyne platform palatable to a broad swath of voters.

With Gray’s defeat, the city embarks on an unprecedented nine-month period of political transition.

On Thursday, a newly lame-duck Gray is set to propose a city budget that will be hammered out by a D.C. Council that almost certainly includes the future mayor in its ranks. Left unclear are the fates of major Gray initiatives such as a $150 million city investment in a professional soccer stadium and a new $300 million city-built hospital in Ward 8.

Also complicating the coming months: The probability of a highly pitched general-election campaign.

Bowser’s victory in the Nov. 4 general election is probable but not assured. The highest-profile entrant so far, fellow council member David A. Catania (I-At Large), trailed Bowser by more than 30 percentage points among registered voters surveyed by The Washington Post earlier last month.

Catania, who was tied in a theoretical matchup with Gray, said after that he had no plans to abandon his mayoral run should Bowser or another Democrat prevail.

Statehood Green and Libertarian candidates will also appear on the November ballot, as well as other potential independents.