I know many strong critics of the police. Many of them are affiliated with the Black Lives Matter movement. None of them stand for ambushing police officers. I also know a few police officers and many prosecutors. Most of them are against racial profiling.

Now, it would be a false equivalence to say that Black Lives Matter activists and defenders of the police are in the same position.

Black Lives Matter activists are seeking changes in an institution - the criminal justice system - that has disproportionately targeted and killed people of color. These activists are disproportionately drawn from communities that have been marginalized based on their race, gender identity, sexual orientation and related issues.

In contrast, police officers are sworn to protect the public, even when they are the subject of criticism and protest. Police officers are also disproportionately drawn from relatively privileged segments of society: men and whites.

The recent controversy over policing has often been traced to racial bias, but it may stem in equal part from gender. I have spent a decade researching ways that race and gender intersect in policing and found that hidden police officer machismo is exacerbating the more commonly noticed problem of racial profiling.

Issues around masculinity

Law officers stand on a street during protests in Baton Rouge, Louisiana, U.S., July 10, 2016. Shannon Stapleton/Reuters To bring about peace, we must first acknowledge that we have a problem.

Having seen such gender patterns before, my colleague Ann C. McGinley, a professor of law at University of Nevada, Las Vegas, and I have often asked,

"What's masculinity got to do with it?"

By masculinity, I simply mean popular assumptions about what is manly behavior. For instance, men do not wear dresses, do not ask for directions and do not dance. Or so we are told.

If one is a man, or just wants to perform masculinity, one will be drawn toward the behaviors that are popularly understood to be manly. An important tendency of masculine behavior in the United States is to confront disrespect with violence.

In policing, this has meant punishing the "noncrime" of "contempt of cop" (offending a police officer) with trumped up charges of law-breaking or physical violence.

The recent killing of Philando Castile serves as one example of the way racial bias and police officer machismo work together.

Racial profiling was evident in the fact that police officers had stopped Castile at the borders between black and white neighborhoods in and around St. Paul, Minnesota. Castile was stopped at least 52 times over the course of a few years. Yet at least half of his citations were dismissed. That is an extraordinary number of stops, and an even more surprising number of dismissals.

Implicit in these excessive race-based stops is a macho stance that is especially prevalent amongst those who go into policing. First, perhaps because police forces often give preference to former members of the military, police officers are prone to bullying the suspects. It should be no surprise that more masculine men thrown into police forces patterned on the military are more prone to aggressive behavior.

Here are the consequences of this culture

Former Oklahoma City police officer Holtzclaw stands with his defense attorney Adams, as his sentence is read during hearing in Oklahoma City. Thomson Reuters To maintain face in the culture that prevails in many police departments, officers must meet any physical threat or even disobedience with violence. As the "Say Her Name" movement has pointed out, when police officers get macho, women of color may also become victims of their violence.

Police bullying of women can come in the forms of false charges, physical violence, or sexual assaults. For instance, former Oklahoma City police officer Daniel Holtzclaw was convicted of 18 counts of sexual offenses against African-American women.

Second, masculinity exacerbates racial profiling because young men of color are the boogeyman. They are the personification of danger in the eyes of much of the public and the police. That status stems from the U.S.' long history of white supremacy and apartheid. Police officers may be both seeking to maintain their place in the male pecking order and genuinely afraid of men of color.

That is why the mention of a gun by a black man can lead a police officer to shoot first and question later. In the case of Castile, as an audio recording of the events later revealed, Castile's "wide-set nose" got him pulled over. And being the subject of heightened fear - a black man with a gun - got him killed.

Of course, police officers are not a monolithic group. White police officers are not all explicitly, or even implicitly, biased against men of color. Many police officers are racial minorities themselves. Moreover, increasing percentages of police officers are women, whose presence has been connected to lessened police brutality.

Nonetheless, acknowledging that racial profiling and police officer machismo travel together is important, as it will require a different approach to fixing policing.

Way forward: deescalate

We cannot just observe the police through body cameras, for that will not stop police officers from feeling more threatened by men of color in the first place. Instead, we need to train police officers to acknowledge both that many of them have implicit biases against racial minorities and that they may feel more fearful of men of color than any other group.

As I think about how this proposal might become reality, I have the same advice for each side of the policing divide: deescalate.

To protesters against the police I say this: After Baton Rouge, rightly or wrongly, you will have to go first. Do not stop criticizing racial profiling and police officer machismo, but do unequivocally disavow shooting police officers.

To police officers I say this: You rightfully feel vulnerable, but do not ratchet up this conflict. Do not condone the idea advanced in some conservative quarters that the slaying of police officers means you must allow crime to rise. Honor your fallen comrades by doing your job even better.

In the day-to-day job, that means using deescalation techniques to turn potential conflicts into peaceful resolutions. Deescalating the overall conflict between police officers and protesters will not be easy, but it will be worth the effort.