A suspect has been charged in connection with the shooting and wounding last week of two police officers in Ferguson, Missouri.
St Louis County prosecutor Robert McCulloch told a news conference the accused was 20-year-old Jeffrey Williams.
He said the suspect, a local resident, was facing two counts of assault in the first degree.
Williams, who was arrested on Saturday night, is also charged with firing a handgun from a vehicle.
"He has acknowledged his participation in firing the shots," Mr McCulloch told reporters.
According to Williams' statement to police, he opened fire in a dispute with some other individuals and did not aim at the police.
Mr McCulloch said: "It's possible at this point that he was firing shots at someone other than the police, but struck the police officer."
"We're not sure we completely buy that part of it," added Mr McCulloch. "We're not 100% sure there was a dispute."
He said the suspect, who could face life in prison, has taken part in the ongoing Ferguson demonstrations against police brutality.
Williams was on probation at the time of last Wednesday's shooting for receiving stolen property, said Mr McCulloch.
The two officers were wounded by gunfire during a protest outside Ferguson police headquarters, which authorities described as an "ambush".
A 32-year-old officer was shot in his cheek, just below his right eye, with the bullet lodging behind his ear.
The other officer, 41 years old, was shot in his right shoulder, with the bullet exiting his body through his back.
St Louis County Police Chief Jon Belmar told a news conference that the two officers are continuing their recovery.
US Attorney General Eric Holder called the shooting a "heinous assault" and branded the attacker a "damn punk".
Ferguson, a majority-black suburb of St Louis, has been the scene of demonstrations since a white police officer fatally shot unarmed African-American teenager Michael Brown last August.
Business owners met on Saturday with Ferguson Mayor James Knowles to complain that their trade has fallen by as much as 80% since the teenager's death.
Mr Knowles has been resisting calls to become the latest official in the city to resign since a Justice Department investigation uncovered systemic racial bias in Ferguson's police and court system.