FERGUSON, Mo. — Two police officers were shot here early

Thursday morning as gunfire rang out in front of the police station,

throwing into panic what had been a spirited — and at times tense —

but largely peaceful night of protests. Demonstrators and police alike hit the ground when the gunshots

echoed through the crisp air. Many people ran for cover. Officers,

clad in riot gear, dragged their wounded fellow officers to safety,

while others crouched behind cars and walls, drawing their handguns

or rifles as they rapidly swiveled their heads every which way to

survey their surroundings. One officer, from the St. Louis County Police Department, was shot

in the shoulder and the other, from the suburban Webster Groves

department, was shot in the face. Both were in serious condition but

had nonlife threatening injuries, said Sgt. Brian Schellman, a

spokesman for the St. Louis County police.

The shots, which witnesses said

they believed came from the top of a hill about 220 yards directly

across from the station, came just hours after the Ferguson police

chief, Thomas Jackson, announced

that he would resign, a move greeted with praise from protesters.

Chief Jackson had been at the center of criticism that he ran a

racially biased department ever since one of his white officers

fatally shot Michael Brown, an unarmed black teenager seven months

ago. A protester confronted the police outside the Ferguson police

station on Wednesday night. Credit Jeff Roberson/Associated Press. But Thursday’s shooting threatened to ratchet up tensions, and

unravel efforts to change the way the police here do business and

heal the anger and frustration that Mr. Brown’s killing unleashed.

In addition to Chief Jackson’s resignation, two other

high-ranking Ferguson officials, the city

manager and the municipal

judge, left their jobs after a scathing Justice Department report

last week that accused the city of racially biased and

unconstitutional practices in its law enforcement. City officials had

hoped that the changes would help residents see that they were

prepared to start anew. Instead, Chief Jon Belmar of the St. Louis County Police

Department said that Thursday’s shooting only realized the worst

fears he has had since the unrest over Mr. Brown’s killing — that

it would lead to serious violence. He said he believed the shooter targeted the officers who were

lined up shoulder to shoulder in front of the Ferguson police station

to keep protesters back.

”I’ve said all along that we cannot sustain this forever

without problems,” Chief Belmar told reporters during a news

conference in front of Barnes-Jewish Hospital in St. Louis, where the

wounded officers were being treated.

“I don’t know who did the shooting, to be honest with you,”

he added. Chief Belmar said that based on the bullets’ trajectory

and where the officers had been standing, he assumed that “these

shots were directed exactly at my police officers.” He said he did

not know what kind of gun had been used.

The Webster Groves officer is 32

years old and a seven-year veteran of the force, while the St. Louis

County officer is 41 and has 14 years experience, the county police

said.

Emotions quickly ran high after

the shooting. One Ferguson officer, standing among the protesters as

things calmed down, said, “This is what they wanted to happen.”

When a protester told him that no one wanted this to happen, the

officer was adamant, saying that was his opinion and that the

protester could differ if he wanted.

Protesters on the scene were quick to point out that the gunfire

did not come from among them, rather from a distance behind them. Earlier in the night, the protests took on a familiar pattern that

had not really been seen here since after a grand jury announced in

November that it would not indict the white officer, Darren Wilson, for the fatal

shooting of Mr. Brown.

It was as much a celebration of Chief Jackson’s resignation as

it was a call for more action. “Not just Jackson, we want Knowles, Ferguson has got to go!”

they yelled in reference to James Knowles III, the mayor of Ferguson.

Protesters engaged in a

cat-and-mouse game of sorts with the police. Dozens of them flooded

into the street in front of the police department, blocking cars as

they tried to pass. Things occasionally got tense between the

protesters and motorists, some of whom refused to back away when

demonstrators lined up in front of their vehicles. On several

occasions, drivers inched forward, tapping the knees of protesters

who dared them to hit them.

Each time, one side would

eventually give in — either the driver would back away or the

protesters would let them through. But on other occasions, police

officers wearing helmets and clutching transparent shields and batons

would race into the street to clear away the demonstrators. The

police made a handful of arrests.

Some of the tensest moments came when the protesters fought among

themselves. Some people urged others to block cars, while others

urged their fellow demonstrators to get out of the street and direct

their anger at the officers who were lined up in front of the police

station.

There were tussles between protesters who did not recognize each

other, with the fault line appearing to be those who had been

demonstrating for many months versus those who were new to the

movement. Some took offense to the supposedly new protesters trying

to tell them what to do. At one point it devolved into fisticuffs in

the street, as the police stood by watching.

But by midnight, the situation calmed down, and the number of

protesters dwindled to around 100, if not less. They stood on the

east side of the road, while the police held their line on the west

side, in front of the station.

Then, without any warning or seeming escalation, the shots.

“I heard the bullets go past my head,” said Bradley J.

Rayford, a freelance photographer, who said he was standing near the

officers when the shots were fired. After the first shot, Mr. Rayford

said, he looked up at a hill across from the police station and saw

muzzle fire from that direction. He said he heard about four shots,

after which he went to the ground.

After the shots were fired on Thursday, the remaining protesters

scattered, and the St. Louis County Police Department’s homicide

unit was sent to investigate.

Dozens of officers from around the region also arrived to secure

the area. A group of officers in tactical gear carefully walked up

the hill across from the police station where Mr. Rayford and other

witnesses said the shots had come from.

By 2 a.m., a handful of people remained in the lot across from the

department, which was encircled in yellow police tape. Investigators

tried to interview people in the group. But in a sign of the chasm

that remained between law enforcement and this protest movement, many

of them were reluctant to talk.