A carnival ride went terribly wrong at a fair in Thailand after a malfunction caused riders to fall off and crash onto the ground.

A one-minute video posted by CGTN on Twitter captured the terrifying incident.

Carnival goers were enjoying the "Pirates of the Caribbean"-themed ride when the safety bars suddenly came loose, the Daily Mail reported. Five riders then fell off their seats and onto the steel platform, and one was even flung onto the ground outside the waiting area.

DISNEYLAND ATTRACTION FORCED TO CLOSE AFTER GUEST BREAKS WOODEN SLAT WHILE JUMPING ON SUSPENDED BRIDGE

MEXICO ROLLER COASTER PLUNGES, KILLING 2 AT AMUSEMENT PARK, OFFICIALS SAY

Horrified onlookers quickly ran to the aid of the victims. The ride’s operator reportedly turned off the machine immediately.

The riders who fell are seen getting up from off the ground. One of them was a young boy who appeared to have injured his forehead.

Paramedics arrived on the scene and transported those who were injured to the nearest hospital.

Law enforcement ordered the ride to close down while they interviewed the owner. Local government officials will also reportedly investigate the ride.

A carnival ride went terribly wrong at a fair in Thailand after a malfunction caused riders to fall off and crash onto the ground. (Photo: iStock)

CLICK HERE TO SIGN UP FOR OUR LIFESTYLE NEWSLETTER

One onlooker said they were shocked by the incident.

“I was taking my young relatives to the fair and watching this ride because it looked so scary. I just heard people screaming at the top then they fell out when the ride came down,” said the woman, identified as Jidapa.

CLICK HERE TO GET THE FOX NEWS APP

“The people who fell out hit the floor very hard, but they kind of slid along the ground, too. One of the girls was crying because of the shock. One boy was thrown outside," the woman said.

“I'm very shaken by it, too. I've never seen this happen before,” she added.