Photo: Robert Alexander/Getty Images

If you’re a police officer called on to help a woman coping with a serious mental illness, but on arrival, she feels threatened after you use a key to let yourself into her apartment, what do you do? What if, in response to your entry, she grabs a small kitchen knife and yells, “I am going to kill you. I don’t need help”?

Hopefully you’d retreat back outside, call for backup, and think of alternatives to deescalate the situation. And to an extent, that’s precisely what two San Francisco police officers did after Teresa Sheehan — who suffers from schizoaffective disorder and in 2008 was reportedly off her medication, not eating, and refusing to change her clothes — forced them out of her place.

Everything should’ve ended there. Except San Francisco v. Sheehan, a police-brutality case, made it all the way to the Supreme Court because the cops’ next move was to go back into Sheehan’s room, guns drawn, without regard for her mental condition. The case matters because it’s the first police-shooting incident the court has confronted since Ferguson put policing and excessive use of force on the map. And, as the Supreme Court is wont to do in these cases, it handed the cops a win. (And the city of San Francisco a sort of loss.)

But the facts in Sheehan are a mess. It turns out that upon reentry, one of the officers pepper-sprayed Sheehan, hoping to subdue her. But she wouldn’t let go of her knife. The other officer then opened fire twice, but Sheehan’s failure to collapse prompted the first officer to unload “multiple” rounds on her. When Sheehan was finally on the ground, a third officer arrived on the scene and, like in the movies, kicked the knife from her hand.

Never mind her disability: To the responding officers, that was a “secondary issue.” What truly mattered, one of them testified, was that they were “faced with a violent woman who had already threatened to kill her social worker.” Sheehan survived her injuries, and later sued the city of San Francisco and the shooting officers for violating her civil rights. She also faulted the city for disregarding her disability under the Americans With Disabilities Act.

You might hope that, in writing the opinion, Justice Samuel Alito would use language that would place the decision in the context of Ferguson. Or at least recognize one of the many instances, caught on video, where police shot and killed a mentally ill person — Jason Harrison, Anthony Hill, and Lavall Hall all come to mind. Or perhaps acknowledge that, according to one estimate, more than half of those killed by police are suffering from mental illness.

Instead, Alito and five other justices ruled that the officers were entitled to a blanket shield from liability, under a doctrine known as qualified immunity. The doctrine is nowhere in the Constitution, yet officers and municipalities invoke it all the time when sued for constitutional violations. And more often than not, courts agree that immunity is proper, so long as the officers’ blunders were “reasonable” under the circumstances. What counts as reasonable? A lot of things, some real, others largely exaggerated. Split-second decision-making. Fear for one’s life. How “dangerous,” “recalcitrant,” and “law-breaking” the victim was. Alito actually used those words to describe Sheehan and found no fault with anything the two officers did in their interactions with her. She was basically asking for it.

But the court didn’t have to go that far. Only two justices, Antonin Scalia and Elena Kagan, disagreed with immunizing the cops and instead would’ve dismissed the whole case outright. The reason is procedural but important: You don’t just ask the Supreme Court to review your case if you don’t have a real legal justification to do so. And San Francisco, which lost at the appellate level, implored the justices to take the case because it wanted to clarify whether the ADA applies to arrests of people with disabilities. An important question, no doubt, but once the court did listen to San Francisco’s plea, the city lost all interest in pursuing the ADA argument. And once abandoned, the court didn’t decide it. (Slate’s Mark Joseph Stern pointed out that a coalition of disability-rights groups, fearing a ruling that the ADA does not apply to police encounters, may have had something to do with the city’s change in strategy.)

So to Scalia, granting immunity to the cops was a “reward” to San Francisco, which he accused of “bait-and-switch tactics” — with a win for the officers, the city would no longer have to worry about defending them in court, or paying out any money judgments against them. Scalia felt “snookered” by the city: “I would not encourage future litigants to seek review premised on arguments they never plan to press, secure in the knowledge that once they find a toehold on this Court’s docket, we will consider whatever workaday arguments they choose to present.”

None of that mattered to the rest of the court. The majority went ahead and spared the cops anyway. And with that, the court’s first true opportunity to address police shootings in the wake of Ferguson came and went, with a victory for two officers who shot and nearly killed a woman who maybe just wanted to be left alone. We don’t really know whether the lives of the mentally ill matter to the justices, but from this and prior cases, we do know that the lives of police do — so much that they’re willing to give them a pass even when the case doesn’t really call for it.