The facts of the case were, at the very least, disturbing.

A 17-year-old was killed in a car crash on Staten Island.

A city pathologist removed the young man’s brain during an autopsy.

Two months later, the teenager’s high school classmates took a tour of the medical examiner’s office in the borough and spotted a jar labeled with their friend’s name — Jesse Shipley — and his brain floating inside.

They told his sister. She told her parents.

And that is how Andre and Korisha Shipley learned that they had buried their son without his brain.

The events, the New York State Court of Appeals wrote, were “tragic and unfortunate.”

But the doctor’s actions were not illegal, the state’s highest court ruled in a 5-to-2 decision on Wednesday, which overturned a $600,000 jury award to the Shipleys.