A federal judge in South Florida tossed out a lawsuit filed by more than a dozen students from Marjory Stoneman Douglas High School in Parkland, Fla., who said they were traumatized by a mass shooting there in February and that county officials should have protected them.

U.S. District Judge Beth Bloom said neither the school nor sheriff’s deputies had a legal obligation to protect students from the alleged shooter, Nikolas Cruz, who is accused of killing 17 people at the school Feb. 14. Her reasoning? The students were not in state custody, the Sun Sentinel reported.

Bloom, who was nominated to the bench by President Barack Obama in 2014, wrote in her opinion:

“The claim arises from the actions of Cruz, a third party, and not a state actor. Thus, the critical question the Court analyzes is whether defendants had a constitutional duty to protect plaintiffs from the actions of Cruz.
“As previously stated, for such a duty to exist on the part of defendants, plaintiffs would have to be considered to be in custody.”

It’s not the first time such reasoning has been used. In 2005, the U.S. Supreme Court ruled that police did not have a constitutional duty to protect a person from harm. That ruling overturned a federal appeals court in Colorado that allowed a lawsuit to stand against a town when its police refused to protect a woman from her husband. He had violated a restraining order and kidnapped their children, whom he killed, the New York Times reported.

But even as Bloom issued her decision, another Florida judge ruled differently in a related case.

Patti Englander Henning, a county judge, ruled that Scot Peterson, the only armed resource officer working at Stoneman Douglas High the day of the shooting, had a responsibility to take on Cruz. Instead, Peterson remained outside. The judge was ruling on a legal bid by Peterson to dismiss a lawsuit by the family of one of the students killed that day. The Sun Sentinel quoted his attorney, Michael Piper, as saying:

“We want to say he had an obligation, but the law isn’t that. From a legal standpoint, there was no duty.”

Englander Henning disagreed and said Peterson had an obligation to “act reasonably.” She allowed the lawsuit against Peterson, who has resigned from the Broward County Sheriff’s Office, to stand.

The Parkland students sued Broward County as well Peterson, Broward County Public Schools Superintendent Robert Runcie and Broward County Sheriff Scott Israel.

The lawsuit said in part:

Defendant Israel and Defendant Broward County either have a policy that allows killers to walk through a school killing people without being stopped. Or they have such inadequate training that the individuals tasked with carrying out the polices . . . lack the basic fundamental understandings of what those policies are such that they are  incapable of carrying them out.

Here’s the lawsuit that was thrown out by U.S. District Court Judge Beth Bloom: