WASHINGTON — The Justice Department cleared a white former Ferguson, Missouri, police officer Wednesday in the fatal shooting of an unarmed black 18-year-old, but issued a scathing report calling for sweeping changes in the city’s law enforcement practices, which it called discriminatory and unconstitutional.

The dual reports marked the culmination of months-long federal investigations into a shooting that sparked protests and a national dialogue on race and law enforcement as the tenure of Attorney General Eric Holder, the first black person to hold that office, draws to a close.

In pairing the announcements, the Obama administration sought to offset community disappointment over the conclusion that the shooting of Michael Brown was legally justified with a message of hope for Ferguson’s black majority. Officials announced 26 recommendations, including training officers in how to de-escalate confrontations and banning the use of ticketing and arrest quotas, for the police force and municipal court.

Holder called the federal report a “searing” portrait of a police department that he said functions as a collection agency for the city, with officers prioritizing revenue from fines over public safety and trouncing the constitutional rights of minorities.

“It is not difficult to imagine how a single tragic incident set off the city of Ferguson like a powder keg,” Holder said.

Ferguson Mayor James Knowles III said the city had cooperated with the Justice Department and has made some changes, including a diversity training program for city employees.

The decision not to prosecute Darren Wilson, the white officer who was cleared in November by a state grand jury and has since resigned, had been expected. To win a federal civil rights case, officials would have needed to prove that Wilson willfully deprived Brown of his rights by using unreasonable force.

Instead, the report found no evidence to disprove Wilson’s testimony that he feared for his safety during the Aug. 9 confrontation. Nor were there reliable witness accounts to establish that Brown had his hands up in surrender when he was shot, Justice Department lawyers said.

One of Wilson’s attorneys, Neil Bruntrager, said his client was satisfied with the outcome. Brown family lawyer Benjamin Crump said the family was not surprised but very disappointed, and one of Brown’s uncles, Charles Ewing, said he believed Wilson was “getting away with it.”

“I really was hoping they would have come up with better findings because this whole thing just does not add up,” Ewing said. “Everything just doesn’t make sense.”

While the federal government declined to prosecute Wilson, it found the shooting occurred in an environment of systematic mistreatment of blacks, in which officials swapped racist emails and jokes without punishment and black residents were disproportionately stopped and searched without good reason, fined for petty offenses and subjected to excessive police force.

The report on the department found its lack of racial diversity – only four of 54 commissioned officers are black – undermined community trust. It also said the city relied heavily on fines for raise revenue and issued arrest warrants for minor infractions including jaywalking and late fees. The confrontation that led to Brown’s death began when Wilson directed him and a friend to move from the street to the sidewalk.

The document was filled with examples of what it called a discriminatory criminal justice system. Among them: One black woman spent six days in jail because of a parking violation. A lawful protest was broken up with a police warning of “everybody here’s going to jail.” And a black man sitting in a car with tinted windows was accused without cause of being a pedophile by an officer who pointed a gun at his head.

Between 2012 and 2014, black drivers were more than twice as likely as others to be searched during routine traffic stops, but 26 percent less likely to be carrying contraband.

The report also included seven racially tinged emails, including some from city officials who remain employed, that did not result in punishment. The writer of one 2008 email stated that President Obama wouldn’t be in office for long because “what black man holds a steady job for four years.” Knowles, the mayor, said one employee was fired and two others are on leave over the emails.

The report’s recommendations, if accepted by city officials, could lead to an overhaul of basic police and court practices. Those include improving officer supervision, better recruiting, hiring and promotion, new mechanisms for responding to misconduct complaints and a new system to reduce fine amounts.

Federal officials on Wednesday described Ferguson city leaders as cooperative and seemingly open to change, saying there were already some signs of improvement. The city, for example, has eliminated bond requirements for many municipal offenses and has extended a program that allows individuals to have warrants recalled and assigned a new court date.

In the last five years, the Justice Department has investigated roughly 20 police departments over alleged civil rights violations. Some have led to the appointment of independent monitors and have been resolved with negotiated agreements in which the police department commits to major changes in its practices. Federal officials say they hope to avoid a protracted court fight with Ferguson to force change.

“It is time for Ferguson’s leaders to take immediate, wholesale and structural corrective action,” Holder said.