CLAYTON, Mo. (AP) — The 20-year-old man charged in the shooting of two St. Louis-area officers had been at the protest outside of the Ferguson Police Department earlier that night, authorities said Sunday.

St. Louis County Prosecutor Robert McCulloch said 20-year-old Jeffrey Williams told authorities he was firing at someone with whom he was in a dispute, not at the police officers.

Williams is charged with two counts of first-degree assault, one count of firing a weapon from a vehicle and three counts of armed criminal action.

The officers were shot early Thursday as a crowd began to break up after a late-night demonstration that unfolded after Ferguson Police Chief Tom Jackson resigned in the wake of the scathing federal Justice Department report. It found widespread racial bias in the city’s policing and in a municipal court system driven by profit extracted from mostly black and low-income residents.

“We’re not sure we completely buy that part of it,” McCulloch said, adding that authorities are not ruling out that other people may be charged in connection with the shootings. He said the investigation is ongoing.

A 41-year-old St. Louis County officer was shot in the right shoulder, the bullet exiting through his back. A 32-year-old officer from Webster Groves was wearing a riot helmet with the face shield up. He was shot in the right cheek, just below the eye, and the bullet lodged behind his ear. The officers were released from the hospital later Thursday.

McCulloch said Williams used a 40mm handgun, which matches the shell casings at the scene.

Williams, who St. Louis County Police Chief Jon Belmar said is black, is being held on $300,000 bond.

The north St. Louis County resident was on probation in St. Louis County for receiving stolen property, McCulloch said.

“I think there was a warrant out for him on that because he had neglected to report for the last seven months to his probation officer,” he said.

Belmar said Thursday that the officers could have easily been killed and called the attack “an ambush.” Attorney General Eric Holder said the gunman was “a damn punk” who was “trying to sow discord in an area that was trying to get its act together, trying to bring together a community that had been fractured for too long.”

The police department, which has been a national focal point since the fatal Aug. 9 shooting of Michael Brown, who was black and unarmed, by now-former police officer Darren Wilson. Wilson was cleared by the Justice Department’s report and by a county grand jury led by McCulloch.

Six Ferguson officials, including Jackson, have resigned or been fired since the federal report was released March 4.