The Ferguson police are on high alert after two officers were shot during a demonstration.

The shooting took place just outside the Ferguson Police Department when dozens of people were protesting against alleged police brutalities.

Police have called the incident an "ambush" by the protesters.

"This is really an ambush. You can't see it coming. You're basically defenceless. That's something very difficult to guard against when you have officers standing in a large group," St Louis County Police Chief Jon Belmar told reporters.

Belmar added: "We could have buried two police officers. I feel very confident that whoever did this ... came there for whatever nefarious reason that it was."

Given the tense atmosphere, political leaders and police officials were cautious in condemning the latest bout of violence.

The injured police officers have been released from hospital. The police have questioned a number of people since the shooting. No arrests have been made as yet.

The shooting has taken the weeks-long anti-police sentiments to a new level. Ferguson has been reeling under strong protests against law enforcement agencies since the shooting of an unarmed black teenager Michael Brown by a white officer.

Condemning the latest violence, President Barack Obama said on ABC's Jimmy Kimmel Live programme: "I think that what had been happening in Ferguson was oppressive and objectionable and was worthy of protest. But there was no excuse for criminal acts. Whoever fired those shots shouldn't detract from the issue; they're criminals."

The latest protests took place shortly after the announcement of police chief Thomas Jackson stepping down.

Protesters have also been holding candle-light vigils calling for calm on Thursday, 12 March night. A statement from the vigil organisers reiterated the need for peaceful protests: "For over 200 days, hundreds of thousands of people across the country have taken to the streets to demand change. We must not forget - Ferguson is only one example of an endemic, national problem."