Jeffrey Williams has been arrested in connection with the shooting of two police officers in Ferguson, Missouri.
Jeffrey Williams, a 20-year-old African-American, has been charged with two counts of assault and gun violations.
The police officers were wounded when shots were fired at them during a protest on March 12.
Ferguson has been a flashpoint for race relations following the shooting of black teenager Michael Brown by a white police officer in August 2014.
Giving details of the arrest, County Prosecutor Robert McCulloh said Jeffrey Williams had admitted to his “participation in firing the shots”, but added, “it was not certain if he had been targeting police”.
The prosecutor said that Jeffrey Williams claimed he fired the shots from a car in a dispute with other unidentified individuals.
Robert McCulloh added that a weapon had been recovered and that Jeffrey Williams is believed to have been the only shooter.
Jeffrey Williams, an, had taken part in the peaceful demonstration earlier in the evening outside police headquarters.
The protest followed the resignation of Ferguson’s police chief after a Department of Justice report found racial bias in his department.
The police officers were wounded in the cheek and shoulder, and have since been released from hospital.
President Barack Obama and Attorney General Eric Holder condemned the attack.
Police chief Thomas Jackson was the sixth Ferguson official to be fired or step down. He had initially resisted calls from protesters and some state leaders to resign.
Thomas Jackson was widely criticized after the shooting of 18-year-old Michael Brown in August and the weeks of demonstrations that followed.
The DoJ report found substantial evidence of intentional discrimination in the police and justice system.
The report contended that African-Americans were at the receiving end of 90% of officers’ use of force.
In November, a St Louis County grand jury found that white police officer Darren Wilson did not break any laws when he shot Michael Brown.
Police across the country have faced criticism following the deaths of a series of black men in contentious circumstances.
President Barack Obama has condemned the criminal acts in Ferguson, Missouri, one night after two police officers at a protest were shot.
Barack Obama said the protesters had “legitimate grievances” but described the shooters as “criminals” who should be arrested.
The shootings on March 11 happened during a demonstration after it was announced Ferguson Police Chief Thomas Jackson would resign.
Further protests on March 12 passed peacefully. The two officers have been released from hospital.
The protests are the latest of many in the city since a policeman shot dead Michael Brown, an unarmed black teenager, in August 2014.
Police Chief Thomas Jackson quit one week after a Justice Department report alleged widespread racial bias in his department and the city’s court system.
Protesters gathered outside the police station after Thomas Jackson’s resignation was announced.
Late on Wednesday, one officer was shot in the face and the other was hit in the shoulder as protestors were heading home for the night.
“I think that what had been happening in Ferguson was oppressive and objectionable and was worthy of protest. But there was no excuse for criminal acts,” President Barack Obama said on the Jimmy Kimmel Live on ABC.
“Whoever fired those shots shouldn’t detract from the issue; they’re criminals,” he added.
Tensions have been high in Ferguson since August and escalated in November after a grand jury declined to prosecute Officer Darren Wilson for Michael Brown’s killing.
On March 12, protesters held a candlelight vigil for all victims of violence. They later marched to the police department while beating drums and chanting.
There were no rows of police officers in riot gear unlike previous demonstrations.
Ferguson police temporarily ceded security responsibilities for the protests to state troopers and county police.
The protests ended without a single arrest about 23:00 local time.