A 7-year-old Australian boy is in critical condition after he accidentally strangled himself while playing with a jump rope, the Australian Associated Press reported.

The boy, whose name is not being reported because of privacy reasons, was playing with friends at Stevensville Primary School in St. Albans, Australia, when the accident occurred.

The jump rope was tied "between the school fence and a sagging wooden fence that belonged to a neighboring house," said Detective Senior Constable Gallagher of the Keilor Downs Cabinet Implementation Unit.

When the boy pulled the rope through the school fence, it also went around his neck and suspended the boy next to the fence.

"It was a freak accident," Gallagher said.

The school’s principal performed CPR on the boy, and he was taken to the hospital immediately.

A spokeswoman from the Department of Education said they are investigating the accident.

Click here to read more on this story from the AAP.