A federal judge has approved a deal between Ferguson, Missouri and the US Department of Justice to reform that city's police department and court system, the Associated Press reported.

This is the latest twist in what's been an ongoing saga between Ferguson officials and the Justice Department. Weeks ago it seemed that a deal was imminent, but then Ferguson pulled out, prompting the Justice Department to threaten a lawsuit.

The agreement includes Ferguson bringing in a monitor for its police force, diversity training, use of software that analyzes police records, and equipping officers with body cameras, according to the AP.

Ferguson Mayor James Knowles III called the deal “ an important step in bringing this community together and moving us forward.”

Negotiations on police reform in Ferguson began after a federal probe last year found widespread bias in both the Ferguson police department and court system, including using both as a money-making venture to impose fines on minorities.

Ferguson originally came under national scrutiny after the death of Michael Brown, an unarmed black teenager who was killed by a white police officer in summer 2014, which was one of the early flash points of the Black Lives Matter movement. The officer, Darren Wilson, was not charged in Mr Brown's death.