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 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 remained in serious condition, but police said their wounds were not life-threatening. 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, Missouri, 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 teenager, Michael Brown, 18.

But after midnight, somebody opened fire from a hilltop, shooting out of the darkness over a small crowd of demonstrators and into a line of cops outside the Ferguson Police Department. Then the shooter disappeared.

“What happened last night was a pure ambush,” Attorney General Eric Holder 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 protestors 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, 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,” said the Rev. Traci Blackmon, a pastor in Ferguson, 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.

Demonstrators said they would return to police headquarters on Thursday evening, for a candlelight vigil. St. Louis County police said their officers, along with the Missouri State Highway Patrol, would take charge of security. Ferguson’s city police force had been in command of security at the building since a state of emergency declared by Gov. Jay Nixon, a Democrat, expired in December.

The only obvious sign of the hunt for the gunman was the raid on a one-story brick house about a quarter-mile from the shooting scene. A neighbor across the street said that he saw a SWAT team take several people out of the house.

The owner of the home, Iris Turner, said that her granddaughter was one of three taken into custody. Turner said her granddaughter had attended the protests and came home when she heard gunfire.

“She wasn’t involved in any of this. None of this,” Turner said as camera crews set up outside of her small brick house. All three were later released without charges.

The police building had been the scene of regular demonstrations in recent months. But on Wednesday evening, the group that gathered in the parking lot was bigger, and the mood was unusually tense.

“It was a bad atmosphere, you could feel it in the air,” said Rasheen Aldridge, a key protest organizer.

As the evening wore on, police made arrests, and advanced with riot shields to push the crowd back. And there were scuffles among the protestors – at one point, one demonstrator struck another, fighting over an accusation that one of them was exploiting the events in Ferguson for financial benefit. Another, larger scuffle broke out a short time later.

As the night deepened, many protestors departed, leaving about 40 stragglers. Among them was Johnetta Elzie, who had stuck around in hopes of securing the release of three people who had been arrested earlier that evening.

Then came the shots. Police said they were fired from a nearby hilltop, where a street runs away toward a residential area of Ferguson. The bullets, apparently fired from a handgun, struck officers who were standing in front of the station, about 125 yards from the shooter.

“As I’m turning to look at the police, I see protesters on the ground crawling, trying to get to their cars,” Elzie said. “I saw the police were on the ground, too.”

A minute later, Elzie said, the police who had been on the ground stood up with their weapons drawn, pointed uphill. She saw one officer being dragged back through the grass. Her immediate fear, she said, was that the police would respond with force and that she might get caught in the crossfire. But the police did not shoot back.

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, Wisconsin, 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.

On Thursday, Brown’s parents–whose loss turned the world’s spotlight to Ferguson–condemned the latest shooting.

“We reject any kind of violence directed toward members of law enforcement,” Brown’s parents said in a statement released through their attorney. “It cannot and will not be tolerated.”