The Associated Press has published a huge investigation into sexual misconduct by police officers, revealing that from 2008 to 2014, 1,000 officers across the country were stripped of their badges (and with them, their certification to work as police in the state) for sex-related misconduct. More than half of the officers — 550 — lost their certification due to sexual assault; another 440 were decertified for other sexual misconduct, which ranged from possessing child pornography or sexting with underage civilians to having (consensual) sex on the job.

What's more alarming is that there's no way the AP investigation uncovered all — or even most — of the sexual misconduct that police officers engaged in over that period. There are a lot of steps between an officer engaging in misconduct and the officer losing his state certification. Every step presents an opportunity for fellow officers, the police department, prosecutors, or the certification board itself to protect an officer before he's forced to turn in his badge.

Sexual assault is always underreported — and that's especially true when the perpetrator is a police officer

A thousand officers getting fired might sound like a lot, but, of course, it's a pretty small fraction of the number of law enforcement officers in America. Look at it this way: If only 550 officers actually committed sexual assault between 2008 and 2014, the annual sexual assault crime rate among all police would be something like 20 per 100,000 — far lower than the rate for the general population. (According to the FBI, the crime rate for rape alone was 36.6 per 100,000 in 2014.)

But the AP isn't reporting that 1,000 officers committed sexual misconduct between 2008 and 2014 — only that 1,000 of them lost their badges over it. So there are two different questions: How often do police officers engage in misconduct? and When a police officer engages in misconduct, how often does he lose his badge over it?

When misconduct by police officers makes it into the news, it's often related to sex. The AP cites a study of news articles about police misconduct by a professor at Bowling Green State University; it found that sex-related cases were the third most common reason for officers to get arrested "behind violence and profit-motivated crimes." A separate analysis of news articles conducted by David Packman for the National Police Misconduct Reporting Project in 2009 and 2010 found that sex-related misconduct was the second most likely reason for a police officer to make it into the news — after excessive force.

That's extremely surprising. Because sexual assault is generally less likely to come to the attention of police than other crimes.

Police can only investigate and count crimes that they know about. With the exception of homicide, where there's literally a dead body to be explained away, cops will almost never find out a crime was committed if no one reports it to them. This can skew crime data in plenty of ways, as I've explained, but — as you can see in the chart above — it's a particularly big problem with sexual assault, whose victims are far less likely to go to the police than victims of other types of crimes.

And the reasons sexual assault is underreported to begin with get compounded when the assailant is a police officer. If a victim doesn't believe that there's any point in reporting her assault because no one will believe her word against her assailant's, or because there's no evidence, or because she's worried her assailant will retaliate — that's probably all the more likely when the person she'd be reporting the assault to is the co-worker of the person who committed the assault.

Police departments have opportunities to protect officers from getting in legal trouble over misconduct

Reporting misconduct is only the beginning. It takes a lot more than that to get a police officer stripped of his badge.

A quarter of the nation's police officers are employed in states that don't have any way to decertify a police officer, including California, New York, and New Jersey. But even when states have decertification boards, they rarely have enough power to go after police officers who are being protected by prosecutors or by their departments.

According to the AP's breakdown of state policies for decertifying police officers, only one state — Utah — requires police departments to tell the state certification board every time a complaint is made against a police officer. In the vast majority of states, an officer is only put at risk of losing his certification after he's already been held accountable for the misconduct by someone else.

In many states, law enforcement agencies are only obligated to report misconduct to the state board after an officer is arrested for, or in some cases convicted of, a crime. In many states, the agency has to report anytime an officer leaves the department due to misconduct that could qualify him for decertification.

Both of these standards give police departments (and prosecutors) a lot of power over when the state board considers decertification. And generally, police departments and prosecutors prefer to "protect their own" — either sweeping misconduct under the rug entirely or deliberately figuring out a way to discipline the officer that won't make him eligible for decertification under state law.

Twenty-five states require a police department to tell the state board anytime an officer is fired for misconduct — or anytime an officer is fired at all. But it's extremely common for officers (like any sort of employee) to resign instead of being fired. The Cleveland police officer who killed 12-year-old Tamir Rice in 2014, Tim Loehmann, had left a prior police department after a terrible performance review raised concerns about a "dangerous loss of composure during live range training and his inability to manage his personal stress." The performance review recommended the officer be fired; shortly after it was filed, the officer resigned for "personal reasons."

Only 10 of the states that require police departments to report firings also require them to report resignations "in lieu of" firing, or resignations due to misconduct. And even then, a police department could get around the reporting requirement by allowing the officer to resign for "personal reasons" (as Loehmann was). Just three states require law enforcement agencies to report it to the state board anytime an officer leaves the department.

Even getting convicted of misconduct doesn't always lead to an officer losing his badge

The AP investigation stresses that in some states, officers can be decertified for misconduct even when there aren't criminal charges. But the opposite is also true: Officers with criminal convictions can often keep their badges.

You might think it would be harder to manipulate state laws that require departments to report whenever an officer is arrested or convicted of a crime. But in most states, just getting convicted of any crime doesn't make you eligible to lose your badge — only certain types of crimes meet that standard. A police officer convicted of sexual assault would almost certainly get sent to the state board for decertification; an officer convicted of "forcible touching," which is a misdemeanor, might not be. That allows prosecutors — who need to retain the trust of police officers in order to do their job effectively, and therefore tend to protect police — to choose which crimes they'll charge someone with in order to avoid decertification.

In 2013, a San Antonio police officer was charged with aggravated assault with a deadly weapon for holding his family at gunpoint. But in 2015 (claiming that family members had changed their stories about the incident), prosecutors reduced the charge to "disorderly conduct." The officer pleaded guilty, but under Texas state law, it wasn't a serious enough crime to make him eligible for decertification.

Even when the state board is allowed to consider stripping a police officer of decertification, it can always decide not to if the officer seems remorseful enough. That's what happened to an Oregon police officer last year, as reported by a Portland TV station:

A state police certification board last week let Portland Police Officer Brian Hubbard keep his badge in spite of a conviction for reckless driving and a .25 DUII after he drove his car into a ditch last February in Washington County. The reason why becomes more clear in a personal letter and supporting documents he later sent to the Police Policy Committee of the Oregon Department of Public Safety Standards and Training. In his letter, Hubbard openly admits his guilt, chronicles what happened that night, the punishment, rehabilitation and counseling that followed, and personal problems that led to alcoholism. The committee reviewed those documents and agreed that Hubbard should be allowed to stay on the job.

A DUI isn't the same thing as sexual misconduct. But that doesn't mean that sexual misconduct is always taken more seriously, either.

The AP's investigation shows that a couple hundred times a year, officers engage in sexual misconduct so egregious that no one in the system can or wants to protect them: neither their employers, nor the prosecutors who've worked with them, nor the state board itself. But as always when it comes to police misconduct, the question this raises is how often police officers engage in misconduct without having to suffer the consequences of their actions.