CLAYTON, Mo. -- A 20-year-old man charged Sunday with shooting two police officers watching over a demonstration outside the Ferguson Police Department had attended a protest there earlier that night but told investigators he wasn't targeting the officers, authorities said.

St. Louis County Prosecutor Robert McCulloch said suspect Jeffrey Williams told authorities he was firing at someone with whom he was in a dispute.

"We're not sure we completely buy that part of it," McCulloch said, adding that there might have been other people in a vehicle Williams is accused of firing from.

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. McCulloch said the investigation is ongoing.

The police officers were shot early Thursday as a late-night demonstration began to break up following the resignation of Ferguson Police Chief Tom Jackson in the wake of a Justice Department report that found widespread racial bias in the police department.

"He was out there earlier that evening as part of the demonstration," McCulloch said of Williams.

But several activists who've been involved in the protests since the Aug. 9 fatal shooting of 18-year-old Michael Brown by a Ferguson police officer told The Associated Press they were not familiar with Williams.

Williams used a handgun that matches the shell casings at the scene, McCulloch said. He also said tips from the public led to the arrest.

Williams, who Belmar said is black, is being held on $300,000 bond. County police spokesman Brian Schellman said he didn't know whether Williams had an attorney or when he'd appear in court. A message left at the St. Louis County Justice Center was not immediately returned.

Brittany Ferrell, 26, a protest leader with the group Millennial Activists United, had just left a meeting with other leaders Sunday when word of the arrest circulated. She said no one in the group knew Williams, and they checked with other frequent protesters -- who also hadn't heard of him.

Ferrell suspected McCulloch tried to cast him as a protester to reflect negatively on the movement.

"This is a fear tactic," she said. "We are very tight-knit. We know each other by face if not by name, and we've never seen this person before."

John Gaskin, a St. Louis NAACP leader, said of Williams, "I don't know him. I've never seen him."

Williams, a north St. Louis County resident, was on probation 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.

Online state court records show a man by the name of Jeffrey Williams at the address police provided Sunday was charged in 2013 with receiving stolen property and fraudulent use of a credit/debit device.

There was no answer at the door at the small, ranch-style home. Several neighbours, including the people just across the street, said they didn't know Williams. But one, 26-year-old Jason White, said "He was cool. I never heard of him doing nothing to nobody."

Attorney General Eric Holder said in a statement Sunday that the arrest "sends a clear message that acts of violence against our law enforcement personnel will never be tolerated" and praised "significant co-operation between federal authorities and the St. Louis County Police Department."

St. Louis County Police Chief Jon Belmar previously called the shooting "an ambush," and had said the two officers easily could have been died like two New York City officers who were shot and killed in their police cruiser in December.

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, and Belmar said Sunday that they "were getting better, not getting worse."

The police department has been a national focal point since Brown, who was black and unarmed, was killed by now-former police officer Darren Wilson. Wilson was cleared by the Justice Department's report and a grand jury led by McCulloch declined to indict Wilson in November.

The federal report 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.

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