A mechanical malfunction on a SeaWorld San Diego ride left almost 50 people stuck in the air for hours.

Image via Twitter from San Diego 6

According to CNN, 48 people, including 46 riders and two SeaWorld employees, endured four hours near the top of the Skytower ride until engineers were able to repair the malfunction.

Many riders were treated for anxiety, and a 17-year-old was taken to the hospital, reports The Daily Mail.

A spokesperson for the park said the riders were never in any danger. They were stuck 220 feet in the air, but there were SeaWorld employees tending to them, providing them with water and snacks the whole time.

Fire Department spokesman Lee Swanson told San Diego 6 that the ride finally came down at 7:25 p.m.

"They had air conditioning, so it wasn't like they were sweltering in a box," Swanson said.

SeaWorld refunded the guests' admission and gave them other park amenities for their trouble and as a thank-you for their patience.