Although violent crime as a whole has been trending downward for decades, a rash of school shootings in recent years has left most parents in the United States with a sense of uneasiness. Communities across the country that watched tragedies like February’s Parkland, Florida, school shooting unfold have come together to try to find solutions that can help ensure the safety of America’s children while they pursue an education. Across the board, one assumption has been nearly universal: our children are safer in schools that have a police presence. However, a new federal ruling pertaining to the Parkland shooting begs some hard questions about that assumption.

Earlier this week, a federal judge ruled that the school district and sheriff’s office in the Florida county the Parkland shooting took place in had no constitutional duty to protect the students of Marjory Stoneman Douglas High School from the shooter, Nikolas Cruz. This wasn’t some errant ruling from a judge with an agenda — there’s significant legal precedent to support the decision. The suit that prompted the ruling was filed by 15 students from the school that saw 17 killed and 17 more injured.

You can see footage from inside the school during the shooting here, but we warn you, although you can’t see the victims in this video, it is nonetheless disturbing:

The basis of the ruling really comes from a common misconception about America’s police officers:

“Neither the Constitution, nor state law, impose a general duty upon police officers or other governmental officials to protect individual persons from harm — even when they know the harm will occur,” said Darren L. Hutchinson, a professor and associate dean at the University of Florida School of Law. “Police can watch someone attack you, refuse to intervene and not violate the Constitution.”

Within the confines of the law, police officers are only actually required to protect you from harm while you’re in their custody, or during circumstances that can be qualified as a “special relationship.” An officer would need to keep a suspect they took into custody safe, for instance, under the general provisions of the law. A crossing guard tasked with keeping kids safe as they cross the street falls under the confines of a “special relationship,” because their role is specifically aimed at keeping kids safe from passing traffic.

Legally, multiple rulings have disallowed the idea that being in school counts as being “in custody,” despite their being some similarities between the two.

“Courts have rejected the argument that students are in custody of school officials while they are on campus,” Hutchinson explained. “Custody is narrowly confined to situations where a person loses his or her freedom to move freely and seek assistance on their own — such as prisons, jails, or mental institutions.”

To some, that may sound a bit like life in a public school — where you’re required to be there and have little autonomy over where you’re allowed to spend your time — but previous rulings haven’t seen it that way, and decisions of this sort are often the product of years of legal precedent, rather than the ethical considerations of the judge that’s overseeing a case.

Eventually, the SWAT team arrived and evacuated the students, as you can see below:

Scot Peterson, the armed sheriff’s deputy that was on the scene as the shooting unfolded, but who chose not to go inside to attempt to intervene, still has a legal battle ahead of him, as another suit in a lower court is being allowed to move forward. That decision, made by county judge Patti Englander Henning regarding a suit filed by Andrew Pollack (whose daughter was killed in the attack), is likely based on the “special relationship” argument, though legal experts agree that Peterson will likely prevail in the long run based on previous rulings.

“They also argued that he enhanced the risk of death, or injury, by Mr. Cruz by negligently ordering a lockdown, which prevented escape from the building,” Mr. Hutchinson said. “Either of these assertions could support liability for Peterson. But I would not be surprised if the state case was reversed on appeal. It is very difficult to establish liability in this area of law.”