By the end of August 12, dozens of counterprotesters in Charlottesville, Virginia, were injured and one was dead, killed in a grisly car attack by Nazi sympathizer James Fields. Now, a new report has found that city officials and law enforcement are to blame — at least in part — for the chaos that transpired on that day.

The report, conducted by the law firm Hunton and Williams, was commissioned by city officials after white nationalists, neo-Nazis, and Ku Klux Klan members descended onto the small Virginia town to protest the removal of Confederate statues. The situation quickly spiraled out of control, leading first to a brief clash on August 11 during an unsanctioned protest and then full-on brawls — and Fields’s deadly attack — on August 12 during the planned protests and counterprotests.

The report, which involved hundreds of interviews as well as extensive reviews of documents and video, lays the blame squarely on city officials and law enforcement.

“[T]he City of Charlottesville protected neither free expression nor public safety on August 12,” the report concludes. “The City was unable to protect the right of free expression and facilitate the permit holder’s offensive speech. This represents a failure of one of government’s core functions — the protection of fundamental rights. Law enforcement also failed to maintain order and protect citizens from harm, injury, and death. Charlottesville preserved neither of those principles on August 12, which has led to deep distrust of government within this community.”

The problems began before the demonstrations. The mistakes were numerous: not reaching out to other jurisdictions that dealt with similar protests for guidance, not providing adequate training, not coordinating with state police, and not including in its operation plan a means to “ensure adequate separation between conflicting groups.”

The first big signs of trouble came during the August 11 protests at the University of Virginia campus in Charlottesville. The report found that university officials knew of the unsanctioned protest “for hours before it began but took no action to enforce separation between groups or otherwise prevent violence.” Protesters and counterprotesters eventually met and clashed at the campus’s statue of Thomas Jefferson.

The report argues the slow, passive response to the August 11 protests “set an ominous tone for the following day,” when the main protests would take place.

This led to a series of disasters on August 12, when protests at Emancipation Park in Charlottesville were scheduled to take place:

Local and state police officers “were unable to communicate via radio, as their respective systems were not connected despite plans to ensure they were,” the report found. This was one of the major reasons that local and state departments “operated largely independently on August 12, a clear failure of unified command.”

Police also lacked access to protective gear, inhibiting their ability to “intervene in physical altercations that took place in areas adjacent to Emancipation Park.” State police even told officers to avoid intervening in physical altercations, while local cops were told “not to intervene in all but the most serious physical confrontations.”

The report noted, “When violence was most prevalent, [Charlottesville Police Department] commanders pulled officers back to a protected area of the park, where they remained for over an hour as people in the large crowd fought on Market Street.”

The police response even made matters worse: “Once the unlawful assembly was declared, law enforcement efforts to disperse the crowd generated more violence as [white nationalist] protesters were pushed back toward the counter-protesters with whom they had been in conflict.”

Police were also often too far away from and too slow to respond to clashes outside the designated protest area.

All of this culminated in James Fields’s deadly attack that day, when police deployed only one school resource officer at the street intersection of the attack and relieved her of her post after she called for assistance, failing to replace her. This vulnerability was one of the reasons Fields was so easily able to ram his car into protesters.

There was one bright spot in the aftermath of Fields’s deadly attack: Police and other first responders were quick to mobilize, quickly getting victims into care. “This prompt, effective response represents a bright success on a day largely filled with failure,” the report said.

But the rest of the report poses an uncomfortable possibility: With better planning, perhaps the violence could have been entirely prevented.