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. officials demanded explanations Wednesday for a vote-counting delay in Tuesday’s Democratic primary that made it impossible to call the mayor’s race and other key contests until nearly four hours after polls closed.

At the heart of the delay, officials said, were five electronic voting machines from which results were not properly extracted. When vote-counters noticed the problem on the machine printouts delivered to election headquarters, they stopped releasing electronic results and fanned out across the city to check the machines and retrieve accurate counts. In the end, officials did not release enough returns to call the race for D.C. Council member Muriel Bowser (D-Ward 4) until moments before midnight.

“It’s ridiculous that we have to wait that long,” said Council member Kenyan R. McDuffie (D-Ward 5), who chairs the committee that oversees the D.C. Board of Elections. “There’s no reason for it to take this long for votes to be tabulated, and for people to have to wait hours and into the morning to have the results of an election with extremely low turnout.”

A history of similar election-night delays, including a six-hour wait for meaningful returns in 2010, made Tuesday’s troubles a sore subject for critics who say the Board of Elections has had ample time to improve its operations.

McDuffie said he has begun asking questions and plans to hold a roundtable April 29 to give elections officials a chance to explain. “I want to make sure that this does not happen again,” he said.

Election officials, meanwhile, provided more fodder for critics by offering shifting and conflicting explanations for what went wrong. On Tuesday, the board’s executive director, Clifford Tatum, said poll workers had not been trained well enough, while Wednesday, board spokeswoman Tamara Robinson said workers, even with two extra volunteers per precinct, had simply been overwhelmed by the workload.

Robinson also initially said that vote-counters began tallying early votes before polls closed at 8 p.m., but she later reversed herself and said that the first early-vote ballots were not loaded into counting machines until 8 p.m.

“I’ve had dealings with the Board of Elections quite a bunch, and I think they are not up for the job,” said Council member David Grosso (I-At Large), who has sponsored a bill that would strip the board of the responsibility to oversee campaign finance in part so it can focus on running elections smoothly.

“They are doing too many things. . . . Their fingers are in lots of different areas,” he said. “Operations around an election is what the BOE should do, and clearly they did not do it very well.”

The public had to wait nearly two hours after polls closed Tuesday before elections officials posted the first batch of results, which included only about 10,000 ballots cast during the city’s early-voting period. Another two hours passed before officials reported enough precincts to declare winners in contested races.

Tatum said that even though the tallying took about 70 minutes longer than he had hoped, he was on the whole pleased with the expansion of the touch-screen machines this year.

“It took a little longer than what we’re used to,” Tatum acknowledged. But “we are confident that the results are accurate, which is what we’re always concerned about — accuracy over speed.”

In the 2008 presidential primary, officials ran out of paper ballots, and in a city primary later that year, officials found inexplicable discrepancies in vote tallies that muddied the outcomes of two D.C. Council races.

In the 2010 mayoral primary — the first year for early voting, same-day voter registration and new touch-screen voting machines — the six-hour delay in reporting triggered accusations of mismanagement.

Mayor Vincent C. Gray (D) addressed Tuesday’s problems before conceding his reelection bid to Bowser around midnight: “We’ve got some work to do there” at the Board of Elections, he said. “We probably have known that for a while. It seems to me [with the small] number of ballots that were cast, we should have been able to get a valid conclusion to this well before now.”

Early voting results were not reported until nearly 10 p.m., and confusion intensified a half-hour later when officials released the first returns from votes cast Tuesday.

Printouts provided at the board’s headquarters and a readout on the board’s Web site indicated that nearly 40 percent of the city’s 143 precincts were reporting. But those sources accounted for only about 17,000 votes, a number that seemed low in an election that was expected to attract 100,000 voters or more.

Reporters stationed at the board’s headquarters Tuesday night could not get an explanation as election officials shut themselves away from reporters and denied that there was any problem.

Around 11:20 p.m., the board reported results for 116 precincts but including only about 45,000 votes — another low number of voters for such a broad swath of the city. Robinson said that the early totals included only paper ballots because of the issues with the touch-screen electronic voting machines.

Calling Election Day a “teachable moment,” Robinson said Wednesday that the board should have provided more information throughout the evening. “I have to say that we could have done a better job in terms of explaining things,” she said, adding that for November’s general election, “that’s definitely going to be part of the agenda.”

This year, for the first time, every precinct had at least two electronic machines, Robinson said, nearly doubling the number of machines in use from 163 in the last several elections to 309 on Tuesday.

“When you think about just five machines out over 300 — in the grand scheme of things that’s not a lot,” Robinson said.

The board did not release results that included electronic ballots until 11:38 p.m. Shortly afterward, Gray conceded the mayoral race.

The process of counting electronic ballots starts by first shutting down the voting machines, a task that takes 10 to 15 minutes, Tatum said. Shutting down two machines is more complicated than simply doing the same process twice. Workers must transfer a memory cartridge from one machine to the next in order to print an audit tape that tallies both machines’ votes.

Tatum said the board will focus on better training of poll workers before the next election and will consider asking the council for more money to buy newer voting machines that are easier to shut down without errors. The current machines were purchased in 2010 and 2012.

Robinson said the board will issue a report in 90 days after examining its internal workings to see what can be improved.

Mike DeBonis contributed to this report.