Imagine getting stuck on a ride for four hours? According to officials, 48 people did just that when they got stuck near the top of the 320-foot-tall Skytower at SeaWorld San Diego.

The ride stopped functioning, which was at first reported as a power failure issue but it turned out to be a mechanical malfunction. Fortunately the air conditioning continued to function on the sweltering day. The San Diego Fire Department responded and paramedics treated two young people for severe anxiety, after the ride finally came back down at 7:24 p.m. No one was injured but a 17-year-old boy that suffered from anxiety was taken the the hospital to be evaluated, San Diego 6 reports.

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

The firefighters had arrived, expecting to rescue people with ropes, which is something that the department trains for at SeaWorld once or twice a year, however that wasn't necessary as SeaWorld employees were able to eventually bring the ride down by themselves.

David Koontz, the communications director for SeaWorld, issued a written statement about the incident and thanked the riders for being patient.

"With guest safety as our top priority, park engineers spent four hours trouble-shooting the problem before restoring power to the Skytower and safely returning the 46 guests to the ride loading area," Koontz said.

"The guests were never in danger and park officials were in constant communication with them while the power failure was being addressed. Two SeaWorld employees were also in the Skytower providing guests with water and snacks," Koontz added.

As compensation, the guests were offered return admission.

The Skytower ride at SeaWorld takes riders up 320 feet and spins them slowly so that they can take in panoramic views of the park and the ocean.