Two police officers were hospitalized with nonlife-threatening injuries after they were shot early Thursday during a protest outside the Ferguson, Mo., Police Department.

Both officers, neither of whom worked for the Ferguson Police Department, appeared to have been targeted, an official told St. Louis TV station KMOV.

“These were shots that were parallel to the ground, not up in the air; they were not skip shots. I would have to make an assumption that these shots were directed exactly at my police officers,” St. Louis County Police Chief Jon Belmar said, the station reported.

“This is really an ambush, is what this is,” Belmar added at a mid-morning press conference on Thursday.

One officer was reportedly shot in the face, while the other officer was shot in the shoulder. The bullet that hit the officer in the face is still in the officer's body. The bullet which struck the other officer in the shoulder exited through his back, according Belmar.

Police believe that a handgun was used in the shootings.

“Fortunately, with both officers, we don’t have any remarkable long-term injuries,” Belmar said. “But you need to know, these two officers took a very hard hit.”

A video shows a chaotic scene following the shots, with protesters starting to run away immediately after the first shot.

Belmar told the St. Louis Post-Dispatch that at least three shots were fired. The newspaper reported that many protesters fell to the ground and fled the area after the shots. Officers at the scene pulled out their weapons and took cover, along with members of the media.

Belmar said he did not know if someone involved in the protests had fired the shots — but it seemed likely that the shooter had at least been among the protesters.

"I do feel like there was an unfortunate association with that gathering," he said at his Thursday press conference, noting that authorities believed protesters had been spread out widely around the police station.

He said the shots came as officers and protesters seemed to be getting ready to dissipate. Two individuals had been arrested earlier that evening for minor charges related to the protests.

Police had not yet detained a suspect in the shooting but were searching a hill near the site of the protests, where some said the shots had originated.

The Wednesday night protest followed the announcement that Ferguson’s police chief is resigning in the wake of a Justice Department report that found his department had engaged in systemic discrimination against black residents.

Investigators found that the police disproportionately used force on, stopped, arrested and cited black residents. They also found emails containing racist jokes that had been sent by police and court officials without any consequences.

The policing conditions in the community — along with the shooting of unarmed black teenager Michael Brown by a white police officer over the summer — led to widespread protests and occasionally violent clashes with police.

— This story was last updated at 10:56 a.m.