By Kevin Rector, Luke Broadwater and Justin Fenton

The city of Baltimore and the U.S. Department of Justice on Thursday signed a historic agreement that, if approved in federal court, will mandate a range of costly police reforms in coming years, from how officers stop residents on the street to how they are trained, supervised and disciplined.

Mayor Catherine Pugh called Thursday a "great day" in Baltimore as she announced the 227-page consent decree agreement at City Hall alongside Attorney General Loretta Lynch, Police Commissioner Kevin Davis and other officials.

"For me, this was not about cost. This was about fairness and understanding," Pugh said. She said the focus of the reform would be "training, training, training, training."

Lynch said she is not under any "illusions that change is easy," but called the deal "robust" and "comprehensive." She said she was confident the reforms would make a difference in the lives of Baltimore residents and thanked Baltimore officials for cooperating with her agency.

The two sides had been locked in negotiations over the agreement since August. The deal must be approved in the U.S. District Court for Maryland in Baltimore, where the case has been assigned to Judge James K. Bredar, a former federal public defender in Colorado and Maryland who was appointed by President Barack Obama in 2010.

The agreement will require the city and the Baltimore Police Department to adopt community-oriented policing tactics, and "conduct all investigatory stops, searches and arrests in a manner that protects people's rights," the Justice Department said.

It touches on a range of reforms on how officers stop, search and interact with residents, including youths, those with mental disabilities and those exercising their free speech rights; when and how officers can use force; how detainees are transported; and how sexual assault complaints are handled.

It also mandates new protocols to ensure impartial policing, the acquisition of new technologies, improved supervision of officers, enhanced accountability in the handling of misconduct investigations, and better coordination with Baltimore City Schools police. It requires changes to the departments recruitment, retention and hiring, and enhancements to how it analyzes data.

It mandates the department track data, including from stops, frisks and arrests, and use it to ensure impartial policing. It also establishes a "Community Oversight Task Force" that will recommend improvements to civilian oversight of the department.

Vanita Gupta, head of the Civil Rights Division within the Justice Department who oversaw the negotiations between the two parties, said the agreement would help "end the legacy of Baltimore's 'zero tolerance' policing."

Davis said he hopes his department becomes a model for other law enforcement agencies all across the country, and that officers would benefit from the deal as much as anyone in the city.

Tessa Hill-Aston, president of the local NAACP chapter, said she was glad the deal has been reached, but that "citizens need to see change as we move forward" in order for it to make a difference. "The community needs to see that the police will be going about things differently, because the inner city and African American men and women have been affected by police behavior," she said.

Maryland's representatives to Congress said they were happy an agreement had been reached.

"We look forward to learning more about the contents of this important document, and hope that it will provide the roadmap for reform the BPD needs," said Sens. Ben Cardin and Chris Van Hollen and Reps. Elijah Cummings, John Sarbanes and Dutch Ruppersberger in a joint statement. "We must ensure that the basic human rights of every Baltimore City resident are respected and upheld by the police officers charged with keeping them safe."

Sen. Joan Carter Conway, a Democrat and chair of the Baltimore City delegation, said persuading the state to help pay for the DOJ-mandated reforms will be a top priority for the delegation.

"We need to move on, we need to move forward, we need to rectify many of the police abuses," she said. "Everybody knows it's going to be very, very expensive _ I think $30 million or more to implement many of the changes."

The union that represents rank-and-file officers in the city, meanwhile, issued a terse statement saying that it had not been included in the process.

"Despite continued assurances by representatives of the Department of Justice that our organization would be included in the Consent Decree negotiations, no request to participate was ever forthcoming and we were not involved in the process," the Fraternal Order of Police Lodge 3 said in a statement.

It said its leadership, members and attorneys had not had a chance to read the document as of Thursday afternoon, but that "a response will be forthcoming at the appropriate time."

The city's spending panel had voted unanimously Thursday morning to approve spending city money on the consent decree agreement, before it was released. Members of the public went before the five-member Board of Estimates to comment on the proposed deal without having seen it. Pugh, who sits on and controls the board, said there would be additional opportunities for the public to comment on the agreement before it is approved by a federal judge.

"This is only the beginning of the process," she said.

The cost of the reforms will be shaped by decisions in the future, including by a federal monitor appointed to oversee the process. The agreement says the monitor will be selected for three years, and then can be reappointed. The deal also includes a cap on how much the monitor can be paid by the city, at $1.475 million annually. Other costs associated with the deal were not outlined. It is expected to cost the city millions.

It comes after weeks of rushed, nearly around-the-clock negotiations spurred on by fears, expressed by both sides and outside stakeholders such as local elected officials and community leaders, that the potential for an agreement would collapse if left to the incoming administration of President-elect Donald J. Trump.

Trump, a Republican, and his Attorney General nominee, Sen. Jeff Sessions, have both expressed skepticism about such Justice Department arrangements, and Trump has backed policing strategies _ such as so-called "stop and frisk" street enforcement _ that the current Justice Department has denounced as ineffective and discriminatory.

The Justice Department began investigating the Baltimore Police Department _ with the support of city officials _ in 2015, after the death of 25-year-old Freddie Gray from injuries suffered in police custody. Gray's death sparked widespread protests that later devolved into rioting, looting and arson.

The unrest laid bare deeply entrenched distrust between the police and the community.

In a 163-page report in August, federal investigators said the police department had for years engaged in discriminatory and unconstitutional policing that disproportionately affected residents in poor, predominantly black neighborhoods. Among other problems, the investigators said the police department engaged in unconstitutional stops and searches, disregarded sexual assault complaints, violated the free speech rights of protesters and routinely used excessive force _ including on youths and people with mental disabilities.

It also said the department did not properly oversee or train its officers, lacked basic technology, and had insufficient mechanisms in place to properly track and retain data.

In light of the findings, the city agreed to enter into negotiations over a consent decree with the Justice Department in lieu of an immediate federal lawsuit to force reform. Pugh, her predecessor, former Mayor Stephanie Rawlings-Blake, and Police Commissioner Kevin Davis have all said they are committed to reform _ and the department has tried to get ahead of the curve by introducing changes in recent months that are in line with past Justice Department consent decrees.

Chinedu Nwokeafor, a Morgan State University senior who led protests at the university in the days after Gray's death, said while the consent decree may contain orders that seem like common sense, a lack of common sense to call a medic and check on Gray during his transport in the police van in which he suffered his fatal injuries is what proved to be fatal.

"If you just look at it at a basic level, there were basic things that weren't done," said Nwokeafor, a member of the Morgan group Strong Men Overcoming Obstacles Through Hard Work. "At least now there's no excuse because there's a decree. Even though it may seem redundant, that's a good way for accountability."

William H. "Billy" Murphy, the attorney for Gray's family, said the agreement between the city and the Justice Department marked a "revolution" in policing in the city.

Bredar, the judge who was randomly assigned the case, will have to review the deal to determine if it is fair, reasonable and adequately serves the public good, experts said. It's unclear how long that will take.

The judge could approve the deal in writing, unilaterally recommend changes, or schedule a hearing on the matter, experts said. Outside groups, such as the police union, could also file motions to intervene in the case, experts said.

The city and the Justice Department asked in a joint filing that the judge consider written input on the deal, and hold a hearing before approving the agreement.

There's no certainty that the agreement will be approved and become binding before Trump's inauguration on Jan. 20. Agreements submitted to the courts under recent consent decrees dealing with police reform in other cities typically took months to be approved by a judge.

(The Baltimore Sun's Justin George and Erin Cox contributed to this report.)

(c)2017 The Baltimore Sun