On July 24, 2012, Police Chief David Brown received a phone call that changed the course of his tenure at the Dallas Police Department.

“Uh, Chief, we had a shooting,” an officer told Brown, according to a Dallas Morning News op-ed the police chief wrote in the wake of unrest in Ferguson, Missouri:

“The officer is OK, but it’s in Dixon Circle, and the suspect was unarmed. And he is black. And the officer is white. A crowd is gathering. We may have a riot on our hands. You might want to turn on your TV. The whole thing is live on the news. We are forming response teams of officers to help with crowd control. We don’t know any other details right now.”

The officer, who shot the unarmed man after an extended foot chase, was ultimately cleared by a grand jury of any wrongdoing. Nevertheless, Brown treated the incident—the most widely publicized among a wave of police-involved shootings in Dallas in 2012—as an impetus to pass a series of reforms aimed at eliminating the unnecessary use of deadly force. As the Morning News reported in 2013, Brown “began reviewing the department’s policies in the shooting fallout” out of a desire to “make changes voluntarily rather than end up under a court-ordered consent decree as has occurred in other major big cities.”

In the aftermath of the chaotic and deadly scene that unfolded in Dallas on Thursday night, where five law enforcement officers were killed and at least seven others were wounded, government officials and law enforcement experts have noted that the Dallas Police Department has distinguished itself as a model of police reform. As Dallas Mayor Mike Rawlings put it in a somber press conference Friday morning, “This police department trained in de-escalation far before cities across America did it. We’re one of the premier community policing cities in the country and this year we have the fewest police officer-related shootings than any large city in America.”

Among the changes the Dallas police have made since 2012: a new foot chase policy aimed at discouraging officers from making risky decisions while pursuing suspects, new guidelines for reporting encounters involving the use of force, and a policy of bringing in the FBI Civil Rights Division to review all police-involved shootings. Since 2014, the department has maintained one website containing a trove of data on more than a decade of police-involved shootings in the city, and another that catalogues all police encounters that result in an officer drawing a weapon, using a baton, or physically restraining a suspect. In 2015, the department received $3.7 million in funding from the Dallas City Council so it could buy 1,000 body cameras over the course of the next five years.

Perhaps the most significant reforms, as suggested by the mayor’s comments, have centered on training. In 2014, Brown introduced a plan to sharply increase the amount of deadly force training required of patrol officers and began to emphasize de-escalation techniques at the Dallas Police Academy.

Brown’s efforts have coincided with a dramatic drop in excessive force complaints. In 2009, the year before he took over the department, there were 147 such complaints filed; as of November 2015, there had been just 13 for the year. Brown told the Morning News in 2015 that he credited the new training methods with a 40 percent year-on-year drop in police shootings and a 30 percent drop in assaults on officers. BuzzFeed’s Albert Samaha points out that, in the years since 2012 (when Dallas police shot 23 people), the frequency of officer-involved shootings has consistently fallen; according to the department’s data, there were 11 last year, and before Thursday, there had been just one in 2016. The fact that Dallas’ murder rate continues to decline, the Washington Post’s Radley Balko has noted, is evidence that a department “can embrace policing policies that are community-friendly, open and transparent, and dedicated to minimizing the use of force and violence … and still enjoy the same or greater drops in crime we’re seeing elsewhere.”

The Dallas Police Department’s reputation as a progressive police force is not just about reform: Brown has also made a point of holding his officers accountable when they’ve engaged in misconduct.

In 2011, for example, he fired an officer who had beaten a man with a flashlight, sprayed him with mace, and kicked him after he was restrained. Brown not only condemned the officer who did the beating—“the response can’t be, when the suspect is defenseless and handcuffed, to kick a person in the head or even to mace a person. We have to be more professional and more disciplined than that,” he was quoted at the time—but singled out the officer who reported the misconduct for praise, calling on his officers to applaud his bravery instead of ostracizing him for bucking the code of silence. In 2014, Brown took the unusual step of using Facebook and Twitter to publicly shame officers he had fired for various forms of misconduct.

No, the Dallas Police Department is not perfect—that much was made clear on Thursday night, when the agency published a photograph of a man that it incorrectly said was a suspect in the shooting. Nevertheless, at a time when the movement for police reform has repeatedly collided with a law enforcement culture that’s resistant to change, the department and Chief Brown deserve credit for all they’ve done.

See more of Slate’s coverage of the Dallas shooting.