Everyone knows you can get in trouble for running through the hallways at school, but it's next-level shenanigans when you're riding a dirt bike instead.

RCMP were called to Holy Cross Collegiate High School in Strathmore, Alta., shortly before 10 a.m. on Wednesday for just such an incident.

The rider entered through the high school and exited at the other end of the building, which houses Sacred Heart Elementary School.

"Staff of the school followed the bike as it narrowly avoiding hitting students in the schools, to a nearby parking lot where a truck was waiting," RCMP said in a news release.

"Police arrested the driver of the bike in the parking lot without incident."

According to RCMP, further investigation revealed several accomplices in the stunt. Four other students at the school were arrested.

All of those involved have been released and police say charges of dangerous driving are pending.