Fairgoers in Crandon, Wisconsin, ended up in a terrifying predicament on Sunday when a malfunction left riders stuck upside down for hours.

A ride called the “Fireball,” which features a large loop around which riders zoom along, stalled near its peak with eight people on board, according to a Facebook post by witness Scott Brass. Riders, seven of whom were children, were trapped upside down on the coaster for more than four hours as first responders worked to rescue them, reported local channel CBS 58 News.

Videos of the incident posted to social media show people dangling head-down from the seats of the ride as a crowd forms below. Men in harness can be seen scaling the side of the Fireball to reach riders before firefighters eventually manage to deploy what appears to be a cherry picker to free them.

The incident occurred at the Forest County Festival. USA TODAY has reached out to organizers for comment.

In his post, Brass also reported seeing a young girl encouraging firefighters to tend to an “older man” who was “struggling” before rescuing her, which he commended as an act of courage.

All eight riders were taken to a local hospital for a checkup after being freed, according to CBS 58 News.

Video shows crack in rollercoaster:North Carolina roller coaster closes after video shows crack on support pillar at Carowinds

Captain Brennan Cook of the Crandon Fire Department told CBS 58 News: “All we know that there is a mechanical failure with the ride where it became stuck in the upright position the ride was recently inspected by the state of Wisconsin here on site and at this time, we do not have any other information.”

Amusement malfunctions

Though amusement and theme park rides are generally very safe and not prone to serious accidents, hiccups do occasionally happen. Data provided by the International Association of Amusement Parks and Attractions estimates the odds of being seriously injured on a fixed-site ride at a U.S. amusement park are 1 in 15.5 million rides taken. However, the rate may be higher for fair and carnival rides, as they are often disassembled and reassembled and are subject to varying rules between states.

Dad saves daughter from zipline accidentGeorgia dad says he had to save daughter after zipline wrapped around her neck at Adventure Park

A North Carolina amusement park closed one of its rollercoasters on Friday after guests noticed a crack in one of its support pillars and video showed pieces moving out of place as cars moved along the tracks. Last year, a