Don't slap a police horse on the behind.

That's the lesson a young student learned in Kingston, Ont., this week, after getting hoofed by an annoyed horse for her mischievous antics.

A brief video of the incident has gone viral online, in which a girl wearing a Queen's University sweater can be seen pulling the stunt during a homecoming event.

In the video, the giggling student runs out from her group of friends and slaps the horse on the hindquarters.

But the police horse was quick to dish out justice, kicking her to the ground with its back leg a split-second after the slap.

The video ends with the girl rejoining her friends, still laughing and apparently unhurt.

Kingston Police said the horse was actually slapped three times during Queen's homecoming. Two men and a woman were charged in connection with the slaps, police said. No one was injured.

In a series of tweets, police said the female suspect was a Queen's student, while one male was from Algonquin College and the other was a resident of Cobourg, Ont.

The horse, Murney, is still in training and was "startled by slaps but kept her restraint," police said.