What was intended to be a harmless school prank has ended with a nearly $50,000 bill for the young student’s parents after the school suffered serious water damage.

In January 2012, Carson Dean, then a 14-year-old student at Wellington Secondary School in Nanaimo, B.C., decided that he would play a prank by attaching his friend’s padlock to something during lunch break.

After being reprimanded by a lunch supervisor for first securing the lock on a door in a downstairs hallway, the teen “moved on and was on the hunt to find something else to lock the padlock to,” a B.C. Supreme Court judgment reads.

That’s when he snapped the lock onto a sprinkler head attached to the ceiling of an upstairs hallway. The student had to jump in the air multiple times to reach it, as the head was eight-feet up.

At one point another teen told Carson: “This is a bad idea, you’re being a dumbass.”

While an audience formed around the prankster, the owner of the padlock, Ben, stood to the side, saying he was concerned about the sprinkler heads going off.

He was right.

“Shortly after Carson’s last jump toward the sprinkler head, the red filament inside the sprinkler head was disturbed and, as sprinkler heads are intended to operate, it immediately began spraying water. In addition, the activation of this sprinkler head caused other sprinkler heads to be similarly activated,” B.C. Supreme Court Justice Shelley Fitzpatrick wrote in her judgment.

The gushing water forced the school to be evacuated, and a total of $48,630.47 in water damage was caused to the facility.

The Nanaimo-Ladysmith School District sued the boy and his parents to recover the costs, saying he was negligent and ultimately responsible for the tens of thousands of dollars in damage.

The Dean family countered the lawsuit, saying their son didn’t intend to cause the damage and that the school should have installed better protections to the sprinkler head system.

They also argued that the school district should have trained the students not to touch the sprinkler head.

An argument that the lunch supervisor should have kept a closer eye on their son was dismissed by the judge, saying there is no requirement by law requiring constant supervision of 14-year-old boys in school. The judge added that there was nothing to suggest that the boy, after being reprimanded, would move on to bolder actions instead of just giving up.

Ultimately, the B.C. court sided with the school board, ruling that the student should have known better than to disrupt the sprinkler system.

Justice Fitzpatrick said she sympathized with the family, but said the case should serve as a warning to other parents.

“I am sure that this is a very unfortunate result for the Dean family and perhaps it will be for other families in the future,” she wrote.

“This was clearly the result of a young boy misbehaving and thinking that the only grief to come of it would be to Ben and perhaps the janitor in removing the padlock. Obviously, more dire consequences followed.”