(Reuters) - The gunman who killed nine people outside a bar in Dayton, Ohio, had cocaine, Xanax and alcohol in his system at the time of the shooting rampage, the county coroner said on Thursday.

FILE PHOTO: A man walks past a memorial for those killed in a mass shooting in Dayton, Ohio, U.S. August 7, 2019. REUTERS/Bryan Woolston/File Photo

Dayton police announced the findings at a press conference and on Twitter and said that two victims of the massacre were struck by gunfire from law enforcement officers responding to the scene.

“While it weighs heavily on us that our response caused harm to these victims, we are comforted that none of our rounds caused the death of any of these innocent people,” Dayton Police Chief Richard Biehl said on Twitter.

Dr. Kent Harshbarger, Montgomery County coroner, said at the news conference that an autopsy conducted on the body of 24-year-old Connor Betts found the drugs and medication in his system.

It was not clear how much of each drug was present at the time of the attack.

The Aug. 4 massacre, which ended when police shot and killed the gunman, was one of three mass shootings over three weeks that stunned Americans and stoked a long-running debate over gun rights.

Earlier this week a friend of Betts, 24-year-old Ethan Kollie, was charged in federal court with lying his drug use on a form he filled out to buy a gun and with possession of a firearm by an unlawful user of a controlled substance.

In announcing the charges, prosecutors said Kollie admitted that he had purchased body armor, an accessory for an AR-15 semi-automatic rifle and a 100-round double drum magazine that Betts used during the shooting.

Kollie kept the items at his apartment in the Dayton suburb of Kettering to conceal them from Betts’ parents, according to court papers. Kollie is not accused with helping plan or carry out the attack.

Betts opened fire outside a bar in the Oregon District of Dayton at 1 a.m. on Aug. 4. The shooting ended rapidly when police moved in and shot Betts dead. Those killed included Betts’ 22-year-old sister, Megan.

The FBI said last week that Betts had a history of violent obsessions and had mused about committing mass murder before his rampage in Dayton’s historic downtown.