Media playback is unsupported on your device Media caption Mayor James Knowles: "The city of Ferguson looks to become an example of how a community can move forward in the face of adversity"

The police chief of Ferguson, Missouri, has agreed to resign after a federal report alleged widespread racial bias in his department.

Ferguson came under investigation after a white police officer killed an unarmed black teenager in August, sparking weeks of unrest.

US authorities have vowed to reform the force, possibly dismantling it.

During protests early on Thursday, two police officers were hit by gunfire, local media reported.

Police clad in riot gear had faced off against demonstrators outside the Ferguson Police Department after Thomas Jackson's resignation was announced.

Mr Jackson had initially resisted calls from protesters and some state leaders to step down, after the shooting of Michael Brown and the weeks of demonstrations that followed.

The St Louis Post-Dispatch newspaper has published what it said was Mr Jackson's resignation letter.

Image copyright Getty Images Image caption Ferguson saw fresh protests after the police chief resigned

Image copyright Getty Images Image caption At least one person was taken into custody during the demonstration

"It has been an honour and a privilege to serve this great city and to serve with all of you," the letter reads.

Brown's shooting in August drew international attention, and Mr Jackson's handling of the situation drew widespread criticism.

A St Louis County grand jury and the US Justice Department found that Officer Darren Wilson did not break any laws when he shot Brown.

But the shooting and the riots that followed spurred a federal investigation, which found overwhelming racial bias in the town's policing practices. The report, released last week, detailed how Ferguson officials used the city's police and court system to generate revenue.

Several other Ferguson officials have stepped down in wake of the report.

'Nationwide search'

Ferguson Mayor James Knowles called Mr Jackson an "honourable man" on Wednesday, saying the chief decided to step down after much "soul searching".

The resignation will be effective on 19 March. The city said it would be giving Mr Jackson a severance payment and would pay for his health insurance for one year.

The city said that it will conduct a "nationwide search" for a permanent replacement for Mr Jackson, who has been chief since 2010.

Image copyright Getty Images Image caption Thomas Jackson will leave the department on 19 March

Image caption Michael Brown's death at the hands of a policeman sparked weeks of protests

The police force had three black officers, despite the fact that the city of 21,000 people was predominately black.

Commenting on the report into abuses at the department, US Attorney General Eric Holder said the federal government will "use all power that we have to change the situation".

That could include dissolving the police force and turning over law enforcement responsibilities to neighbouring agencies.

Mayor Knowles has downplayed this as a possibility, and has said that city leaders will meet with officials from the Department of Justice later this month and discuss reforms to the police department and court system.

"We are committed to keeping our police department and having one that exhibits the highest degree of professionalism and fairness," Mayor Knowles said on Wednesday.

The federal report found that black motorists were more than twice as likely as others to face searches during traffic stops and were more likely to be subject to excessive force from police.

Since the report was released, the city manager, a judge, two police officers, and a court clerk have either resigned or been fired.