There have been too many lives lost to police killings. Too many phone calls telling families that their loved ones, particularly young black men, won’t be coming home. But in most cases, it isn’t because individual police officers are consciously racist or think black lives don’t matter. It is because officers perform the way they are trained to perform.

Having served as an officer at a large municipal police department, and now as a scholar who researches policing, I am intimately familiar with police training. I’m not just relying on my own experience, though. I’ve had long conversations with officers and former officers, including firearms trainers and use-of-force instructors, at law enforcement agencies across the country, and they’ve all led to one conclusion: American police officers are among the best-trained in the world, but what they’re trained to do is part of the problem.

Police training starts in the academy, where the concept of officer safety is so heavily emphasized that it takes on almost religious significance. Rookie officers are taught what is widely known as the “first rule of law enforcement”: An officer’s overriding goal every day is to go home at the end of their shift. But cops live in a hostile world. They learn that every encounter, every individual is a potential threat. They always have to be on their guard because, as cops often say, “complacency kills.”

Officers aren’t just told about the risks they face. They are shown painfully vivid, heart-wrenching dash-cam footage of officers being beaten, disarmed, or gunned down after a moment of inattention or hesitation. They are told that the primary culprit isn’t the felon on the video, it is the officer’s lack of vigilance. And as they listen to the fallen officer’s last, desperate radio calls for help, every cop in the room is thinking exactly the same thing: “I won’t ever let that happen to me.” That’s the point of the training.

More pointed lessons come in the form of hands-on exercises. One common scenario teaches officers that a suspect leaning into a car can pull out a gun and shoot at officers before they can react. Another teaches that even when an officer are pointing a gun at a suspect whose back is turned, the suspect can spin around and fire first. Yet another teaches that a knife-carrying suspect standing 20 feet away can run up to an officer and start stabbing before the officer can get their gun out of the holster. There are countless variations, but the lessons are the same: Hesitation can be fatal. So officers are trained to shoot before a threat is fully realized, to not wait until the last minute because the last minute may be too late.

But what about the consequences of a mistake? After all, that dark object in the suspect’s hands could be a wallet, not a gun. The occasional training scenario may even make that point. But officers are taught that the risks of mistake are less—far less—than the risks of hesitation. A common phrase among cops pretty much sums it up: “Better to be judged by twelve than carried by six.”

In most police shootings, officers don’t shoot out of anger or frustration or hatred. They shoot because they are afraid. And they are afraid because they are constantly barraged with the message that that they should be afraid, that their survival depends on it. Not only do officers hear it in formal training, they also hear it informally from supervisors and older officers. They talk about it with their peers. They see it on police forums and law enforcement publications. For example, three of the four stories mentioned on the cover of this month’s Police Magazine are about dealing with threats to officer safety.

Officers’ actions are grounded in their expectations, and they are taught to expect the worst. The officers who shot John Crawford may have honestly believed that he was raising his rifle to a shooting position even though security camera footage shows him on the phone, casually swinging the BB gun back and forth. The same may be true of the Phoenix officer who shot an unarmed man because he thought, mistakenly, that the suspect had a gun in his waistband. The officers saw what they were afraid of. They saw what they were trained to see. And they did what they had been taught to do. That’s the problem.

Police training needs to go beyond emphasizing the severity of the risks that officers face by taking into account the likelihood of those risks materializing. Policing has risks—serious ones—that we cannot casually dismiss. Over the last ten years, an annual average of 51 officers were feloniously killed in the line of duty according to data collected by the FBI. In the same time period, an average of 57,000 officers were assaulted every year (though only about 25 percent of those assaults result in any physical injuries). But for all of its risks, policing is safer now than it has ever been. Violent attacks on officers, particularly those that involve a serious physical threat, are few and far between when you take into account the fact that police officers interact with civilians about 63 million times every year. In percentage terms, officers were assaulted in about 0.09 percent of all interactions, were injured in some way in 0.02 percent of interactions, and were feloniously killed in 0.00008 percent of interactions. Adapting officer training to these statistics doesn’t minimize the very real risks that officers face, but it does help put those risks in perspective. Officers should be trained to keep that perspective in mind as they go about their jobs.

Training also needs to compensate for the unconscious racial biases that lead officers to perceive a greater threat from black men than from others. Officers are not unique in that regard; implicit racial animus is depressingly common in society. But it is of special concern in the context of policing. Because officers use more force when they perceive a greater threat, unconscious bias can lead officers to react more aggressively when confronting black men than they would when confronting others in otherwise identical situations. As we’ve seen too many times, the results are beyond tragic. Although it may be impossible to completely eliminate every aspect of unconscious bias, research strongly suggests that more sophisticated training could lead to more accurate threat identifications, correcting for racial bias that officers may not even be aware of.

Use-of-force training should also emphasize de-escalation and flexible tactics in a way that minimizes the need to rely on force, particularly lethal force. Police agencies that have emphasized de-escalation over assertive policing, such as Richmond, California, have seen a substantial decrease in officer uses of force, including lethal force, without seeing an increase in officer fatalities (there is no data on assaults). It is no surprise that the federal Department of Justice reviews de-escalation training (or the lack thereof) when it investigates police agencies for civil rights violations. More comprehensive tactical training would also help prevent unnecessary uses of force. Instead of rushing in to confront someone, officers need to be taught that it is often preferable to take an oblique approach that protects them as they gather information or make contact from a safe distance. Relatedly, as I’ve written elsewhere, a temporary retreat—what officers call a “tactical withdrawal”—can, in the right circumstances, maintain safety while offering alternatives to deadly force.

Officers must also be trained to think beyond the gun-belt. The pepper spray, baton, Taser, and gun that are so easily accessible to officers are meant to be tools of last resort, to be used when non-violent tactics fail or aren’t an option. By changing officer training, agencies could start to shift the culture of policing away from the “frontal assault” mindset and toward an approach that emphasizes preserving the lives that officers are charged with protecting. Earlier this year, officers took just that approach in Kalamazoo, Michigan, relying on tactics and communication rather than weaponry to deal with a belligerent man carrying a rifle. As a result, a 40-minute standoff ended with a handshake, not an ambulance. The Seattle Police Department offered an even more dramatic example in 1997, when they eventually ended an 11-hour standoff with a mentally ill man wielding a samurai sword by making creative use of a fire-hose and a ladder. The suspect was apprehended with only minor bruises, and no officers were injured.

Finally, police executives need to move beyond the reflexive refusal to engage in meaningful review of police uses of force. Police may act in the heat of the moment, although not nearly as often as is commonly believed, but that should not insulate their choices from review. If anything, it should lead us to review more thoroughly the factors that led to that heated moment. That review should be focused not on pointing fingers, although holding officers accountable is certainly critical, but on identifying the factors that contribute to the ultimate use of force. Walter Katz, Deputy Director of the Inspector General’s Office that oversees the Los Angeles Sheriff’s Department, has suggested that police shootings be reviewed by applying the Human Factors Analysis and Classification system used to investigate plane crashes. The emphasis is on identifying that factors that contributed to the error so that the error can be prevented from happening again. Officer training should be constantly revised to incorporate the lessons learned from those reviews.

Police reform requires more than changes to training, of course. The policing mission needs to be focused on keeping communities safe and free from fear—including from fear of officers themselves. There are deep racial tensions in law enforcement that will only be healed through a long-term, sustained commitment to cooperative policing and community engagement. We need to rethink the many legal, structural, and social impediments to investigating officer-involved violence and the institutional reluctance to accept independent oversight, particularly civilian review. The path to real and lasting change is daunting, and it will involve many years and many steps. One of those steps must be changing the way police officers are trained.