A Missouri teenager was banned from graduating with his high school senior class after a prank offering to sell his high school on Craigslist backfired on him.

>> Read more trending news

Kylan Scheele, 18, admitted he posted the ad on Craigslist offering Truman High School in Independence, Missouri, for sale at a bargain price of $12,725, according to the Kansas City Star, but Scheele said it was just a joke.

The school district didn’t see it that way and banned Scheele from participating in the school’s graduation ceremony last weekend.

The ad included a listing of amenities that came with the school, like a new athletic field, plenty of parking and a "bigger than normal dining room," according to WDAF-TV.

But district officials said the problem with the ad was the reason for the sale. Scheele wrote the school was being sold "due to the loss of students coming up," WDAF reported.

“I decided to say the reason we’re selling this is because of 'the loss of students,' because the senior class is graduating,” Scheele said.

The teenager said he apologized for the joke, but school officials weren’t laughing and gave him the harshest penalty possible, suspending him from the school’s graduation ceremony.

The American Civil Liberties Union of Missouri has since filed a lawsuit against the school district, contending the harsh punishment violated Scheele's free-speech rights.