FERGUSON, Mo. - Police spent Thursday searching for the gunman who opened fire during a late-night protest against police misconduct here - a shooting that wounded two officers and brought fear and mistrust back to the streets of this battered St. Louis suburb.

At midday Thursday, heavily armed police descended on a house in Ferguson as part of the investigation into the shooting. They brought several people in for questioning, according to Sgt. Brian Schellman, a spokesman for the St. Louis County police.

But none of those people were actually arrested, and by Thursday evening police said they had no one in custody in the case.

The two wounded officers were quickly released from the hospital. One, a 41-year-old officer on the St. Louis County police force, was struck in the shoulder. The other, a 32-year-old on the police force of Webster Groves, Mo., was struck in the cheek; the bullet ended up lodged near his eye.

The officers were shot at the end of a day that, hours earlier, had appeared to herald progress in Ferguson. Police Chief Thomas Jackson, whose force had been castigated by Justice Department investigators for unfairly targeting black residents, had agreed to step down.

His departure had been a key demand of the protest movement that sprang up last summer, after a white Ferguson officer shot and killed an unarmed black 18-year-old, Michael Brown.

But after midnight, somebody opened fire from a hilltop, shooting out of the darkness over a small crowd of protesters and into a line of officers outside the Ferguson Police Department. Police said the shots were believed to have been fired from a handgun, up to 120 yards away. Then the shooter disappeared.

"What happened last night was a pure ambush," Attorney General Eric H. Holder Jr. said Thursday afternoon in Washington, as his department offered local officials its full range of investigative resources. "This was not someone trying to bring healing to Ferguson. This was a damn punk, a punk, who was trying to sow discord."

If that was the goal, it worked.

On Thursday, the shooting - along with the tense protests that preceded it - appeared to have deepened distrust between police and protesters here, after months of gradually diminished tensions.

Kevin Ahlbrand, president of the Missouri Fraternal Order of Police, said that the protests late Wednesday were especially confrontational, with a vocal minority of demonstrators shouting abuse and racial epithets at officers.

"I don't understand it," said Ahlbrand, who is a sergeant with the St. Louis Metropolitan Police Department. "They got what they have been asking for - for the chief to resign. Why are they angrier now?"

Protest leaders condemned the shooting and worried that it may trigger a more aggressive police crackdown. "Whoever did this last night put us all in danger," the Rev. Traci Blackmon, a pastor in Ferguson, said in a phone call with reporters.

Blackmon also voiced a theory-shared by many in the Ferguson demonstrations Thursday-that the shooter may have been someone trying to undermine the protest movement by tainting it with violence.

"I don't mean that I have anybody, any person, or any group in mind. But it's just very difficult not to be suspicious," Blackmon said. She continued: "I'm suspicious that it is a random act that happened to happen last night. And it wasn't intended to derail us from the path that we're on right now."

On Thursday, President Obama tried to soothe tensions via Twitter: "Violence against police is unacceptable. Our prayers are with the officers in MO. Path to justice is one all of us must travel together." The message was signed "-bo," which the White House says is an indication it was written by Obama himself.

Demonstators said they would return to police headquarters on Thursday evening for a candlelight vigil.

Thursday's shooting quickly revived a bitter debate about American policing, which began with Brown's killing, and the hyper-militarized response of local police to Ferguson protesters. Since then, public anger has erupted repeatedly at police violence - over the killing of a 12-year-old in Cleveland and an unarmed man in Madison, Wis., and after a New York police officer was not indicted for the choking death of an unarmed man in Staten Island.

Violence has also been aimed at police in recent months. In September, two police officers in the St. Louis area were fired upon, and one of them was hit in the arm; police said the separate incidents did not appear tied to any protests.

Two New York police officers were gunned down in their squad car in December, an episode that garnered international attention and was followed by officers speaking out about feeling targeted and dehumanized.