The warnings came from all sides in the months leading up to Georgia’s disastrous primaries on Tuesday: local election officials, voting rights advocates and even the state’s top election official.

The combination of limited training on new voting machines and reduced polling locations due to the novel coronavirus could produce crushingly long lines and severely hamper voting access, they cautioned.

Yet none of those in charge of Georgia’s elections were able to head off what all agreed was a breakdown of the voting system. Residents waited for hours to cast ballots, some past midnight. Workers struggled to operate new touch-screen machines. Some polling places in suburban Atlanta opened with no equipment at all.

In the aftermath, as the nation reckoned with the possibility of a similar debacle in November, state and local officials blamed each other, but they could not explain why Tuesday’s problems were so predictable — and yet not preventable.

“The cause of the problems is grave mismanagement of elections here in Georgia,” said Aunna Dennis, executive director of Common Cause Georgia, a civil rights watchdog. “The state failed to heed the warnings of what could happen in this election.”

As local and state officials vowed to investigate what went wrong, interviews with voters and election officials around the state pointed to a combination of factors, including the collision of a new voting system with the pandemic, which led to the cancellation of training sessions and diminished the corps of polling workers.

On top of that, overwhelmed county election offices struggled to handle a crush of absentee ballot requests, leading to thousands of voters never receiving theirs in the mail.

The widespread problems in Georgia were quickly seized upon by both political parties. President Trump’s campaign said it showed the risks of mail voting, a practice he has attacked without evidence as prone to fraud. Democrats and voting rights advocates seized on Georgia’s chaotic primary as an intentional act of voter suppression, accusing Secretary of State Brad Raffensperger (R) of failing to prepare adequately.

“What happened in Georgia yesterday was by design,” former secretary of state Hillary Clinton tweeted Wednesday.

Such charges are especially fraught in Georgia, which has a long history of racist election practices and saw a heated 2018 governor’s race between Democrat Stacey Abrams, who is black, and Republican Gov. Brian Kemp.

Raffensperger disputed the idea that his office failed to prepare, saying that most of the problems stemmed from poor planning at the local level, pointing in particular to Fulton County, home of Atlanta, and DeKalb, to the city’s east.

He promised Wednesday to work with the state legislature to give the state greater authority to “directly intervene and require management changes” at the local level.

“What is clear from yesterday is that while almost every county delivered successful elections, a couple did not,” he said in a statement, adding: “We are here to protect every voter. Republicans, Democrats and Independents deserve well-run elections.”

For their part, Fulton election officials acknowledged their difficulties keeping up with demand for mail-ballot requests, polling place staffing and worker training.

Adding to the challenge: The county’s top two mail ballot officials came down with coronavirus at the height of election preparations. One of them, Beverly Walker, 62, died on April 15.

“We are going to look at everything that happened in this election and will make sure in November we serve the residents of this county with distinction,” said Rick Barron, Fulton’s elections chief. While Barron acknowledged that the county fell short, he also called on Raffensperger to take responsibility and contribute to the fix.

“He’s the head election official in the state, and he can’t wash his hands of all responsibility,” Barron said.

Many said that what happened Tuesday reflects the need for structural change in the way elections are run in Georgia, with more funding and more uniform administration needed — something only the Republican-controlled state legislature, or Congress, can make happen.

U.S. Sen. Amy Klobuchar (D-Minn.) has proposed $3.6 billion in additional election funding nationwide to help local governments contend with the effect of the pandemic on elections. She said Georgia’s primaries dramatically demonstrated the need.

“When there are any kinds of attacks on our country, we do not expect some local city to defend themselves,” Klobuchar said. “When Pearl Harbor was attacked, we didn’t say, ‘Pearl Harbor, you’re on your own.’ And when we have issues with the pandemic, that is not the fault of the counties that are having these elections right now. Basically that’s what you’re saying if you don’t step in. You’ve got to at least give people a fighting chance to be able to vote.”

Georgia was not the only state that struggled with long voting lines Tuesday. In Nevada’s Clark County, which had just three in-person polling locations, the wait stretched as long as seven hours. In South Carolina, where some polling locations failed to open on time, voters were also forced to stand in line for hours.

Voters in Georgia confronted the first widespread use of new ballot-marking devices, which replaced a paperless electronic voting system that a federal judge had declared insecure. Even before the pandemic struck, election security experts had questioned whether officials had enough time to provide adequate training for their use in the primaries.

When Brittany Westveer, a 26-year-old public relations specialist in Atlanta, arrived at her polling place at 7:40 a.m., she was roughly 0.2 miles away from the entrance, she said. She ended up waiting five hours.

Once her turn came, she said poll workers failed to guide voters who were confused about using the machines or answer their questions.

“I would love to see some sort of change happen soon, especially with the November election coming up,” Westveer said. “The governor’s election left a bad taste in everyone’s mouth, and this one especially did now. We’re hoping to see change soon.”

A spokeswoman for Dominion Voting Systems, the contractor that provided new voting machines, said the company received a relatively high number of calls from poll workers in DeKalb, Cobb and Fulton counties seeking help setting up equipment, checking in voters and activating voter cards.

“It points to the fact that the counties needed more training support going into Election Day,” said Kay Stimson.

The company received relatively few calls to replace faulty components, she said, indicating that machine malfunction was not a widespread issue.

Under a state contract, Dominion provided training to county election officials who were then responsible for training poll workers. Stimson said the company’s training was partially disrupted by the coronavirus pandemic, leading to the cancellation of a second trial run.

Raffensperger’s deputy, Jordan Fuchs, said the office has launched an investigation into what went wrong but emphasized that the issues were most pronounced in a small handful of counties. She said her office had sought to help counties hire substitute poll workers, worked with Dominion to produce training programs and encouraged all voters in Georgia to vote early or by mail to avoid a potential crush on Election Day.

“We spent the last three months telling people: ‘Please, please, vote early. Please vote absentee,’ ” Fuchs said. “There are going to be long lines. There are going to be shortages.”

They weren’t the only ones.

DeKalb County officials were concerned ahead of the election about the “significant challenges” that the coronavirus outbreak would pose, according to county chief executive Michael Thurmond (D).

In the two months leading up to Tuesday’s election, officials on the Fulton County Board of Registration and Elections expressed concerns about a range of issues that voters could face, including equipment failures, long lines and an increase in absentee ballot applications, meeting records show.

Last month, officials raised alarms that voters were not receiving their absentee ballots despite submitting applications — and anticipated that those voters would show up in person. They warned of the potential for jammed scanners, an issue that surfaced during early voting and again on Tuesday.

In the end, the most severe of Tuesday’s problems were in Fulton, where a mass exodus of poll workers fearing coronavirus exposure forced the closure of 34 polling places. One polling place in Atlanta served more than 16,000 voters — more than triple the usual amount.

Officials also struggled with overloaded circuits that caused voting machine power to flicker, a severe shortage of provisional ballots and astronomical demand for mailed ballots.

On top of that, county officials said at least 8,000 mail-ballot applications were lost, likely adding to the crush of voters waiting in line on Election Day.

Barron acknowledged that many poll workers never received in-person training for the new voting system launched statewide on Tuesday. Poll workers were so unused to the new touch-screen machines that they inserted magnetic voting cards upside down, delaying voting for hours trying to figure it out rather than moving quickly to allow voters to submit emergency paper ballots, Barron said.

“We would have lost more poll workers had we done in-person training, because people weren’t comfortable with it,” he said.

In Gwinnett County, a northeast suburb of Atlanta, officials took responsibility for the late delivery of voting machines to 16 out of 144 polling places, which they attributed to a miscalculation of the capacity of trucks.

In DeKalb, east of downtown, where long lines and training issues also surfaced, both the state and county were at fault, and any investigation into what went wrong needs to look at the role of both levels of government, Thurmond said.

Thurmond expressed frustration at Raffensperger’s statement blaming DeKalb and Fulton officials, noting that the problems were not limited to those two counties.

“To somehow conclude that the problems were the result of an action taken or not taken by two counties, without any investigation, any review, without talking to anyone, without reviewing the technology and how it operated — to draw that conclusion, is stunning,” Thurmond said Wednesday. “How do you know that that’s true?”

The state knew, he added, that dozens of experienced poll workers decided not to work because of fear of the coronavirus, and those recruited to replace them were not properly trained. No training support was offered in response, he added.

Judges ordered at least 20 counties to stay open past 7 p.m. Tuesday due to various voting snarls. Long lines were reported in a scattering of communities outside of the Atlanta area, including Savannah and Columbus.

Eric Holder, who served as Barack Obama’s attorney general and now leads a political committee focused on ending partisan gerrymandering, said voters are starting to recognize the need for widespread electoral reform, much as they have awakened in recent weeks to the need for reform of police agencies.

“We have to make sure people understand what’s at stake. We can’t have another Wisconsin. We can’t have another Ohio. We can’t have another Georgia,” he said, referring to a string of states experiencing coronavirus-related election difficulties this year. “People are going to lose their faith in their ability to cast their vote.”