The St. Louis suburb of Ferguson has been at the center of a renewed national debate over police use of force, particularly against black men, since a white officer killed an unarmed black teenager there in August.
St. Louis County Police Chief Jon Belmar told reporters early on Thursday that a 41-year-old officer from his department was struck in the shoulder and a 32-year-old officer from the nearby Webster Groves Police Department was hit in the face around midnight as the crowd was starting to break up.
"These police officers were standing there and they were shot, just because they were police officers," Belmar said. "I have said all along, that we cannot sustain this forever without problems."
He said the officers, whom he did not identify, were both conscious and being treated at a local hospital. The department later said in a statement that both were in serious condition.
The shooting of 18-year-old Michael Brown by officer Darren Wilson, along with other police slayings of unarmed minorities in cities like New York City and decisions by grand juries to not charge the involved officers, last summer sparked months of protests in the region and around the country.
Several dozen protesters had gathered in front of the Ferguson police department on Wednesday night, just hours after Police Chief Thomas Jackson resigned.
The demonstration started peacefully, but about two dozen officers clad in riot gear later faced off with the protesters. At least two people were taken into custody.
Around midnight, gunshots rang out, turning a scene of relative quiet into pandemonium. Many of the remaining few dozen demonstrators fled, some screaming, "They hit a cop," a Reuters photographer said.
The line of police scrambled, with many taking defensive positions drawing their weapons and some huddling behind riot shields, according to a video published online.
Belmar said the shooter was "embedded" among the demonstrators standing across from the officers.
"I don't know who did the shooting to be honest with you right now, but somehow they were embedded in that group of folks," he said.
Protesters at the scene however said on social media that the shots did not come from where they were standing.
"The shooter was not with the protesters. The shooter was atop the hill," activist DeRay McKesson said on Twitter.
"I was here. I saw the officer fall. The shot came from at least 500 feet away from the officers," he added.
The fatal shooting of two New York City officers on Dec. 20 by a troubled man who said he was seeking to avenge high-profile police killings in the city and Ferguson have put law enforcement around the country on edge.
Protesters had called for Jackson's removal since the fatal shooting of Brown. Neither a grand jury nor the federal probe led to charges against Wilson.
Jackson was the latest in a string of Ferguson officials to resign in the week since a scathing Justice Department report found widespread racially biased abuses in the city's policing and municipal court.
The probe found that the city used police as a collection agency, citing traffic citations to black residents to boost city coffers through fines, creating a "toxic environment."
U.S. Attorney General Eric Holder said last Friday that the Department would use its full authority to demand police reforms in Ferguson, including possibly dismantling the department.