KING OF PRUSSIA, Pa. (WJW) – A young boy was left hanging by his neck at an indoor amusement center in Pennsylvania over the weekend after becoming entangled in a rope ladder.

The West Vincent Township Police Department confirmed the incident earlier this week on Facebook. Officials said the 8-year-old was visiting Thrillz Park in King of Prussia on Saturday when his head “slipped through” part of a rope obstacle and became stuck.

“Entangled in the rope and hanging by his neck he became unresponsive and [was] not breathing,” police wrote.

Fortunately, an off-duty member of the police department was also at the park, and jumped in to help along with another off-duty officer and an off-duty nurse. The three worked to untangle the boy and get him breathing again.

“Thanks to their heroic lifesaving actions, the boy regained consciousness as paramedics arrived,” the West Vincent Township Police wrote on Facebook.

The 8-year-old was transported to a hospital and released later that day.

In a statement shared with FOX 29 in Philadelphia, the owner of Thrillz Park said the boy is recovering and commended everyone who helped.

“We are told by police that the boy is okay and the injury is not serious,” the statement said, in part. “Our thoughts are with the family and we will be contacting them soon.”