Image copyright AP Image caption Rescue workers abseiled down to those who were trapped

Emergency teams in the US have rescued 21 people who were trapped 148ft (45m) above the ground on a theme park ride that went wrong in California.

Some people were stuck on the ride at Knotts Berry Farm near Los Angeles for more than seven hours.

The Sky Cabin is a slow-moving observation ride where guests travel in an enclosed revolving capsule.

Rescue workers abseiled down to those who were trapped and took them out one by one.

Media playback is unsupported on your device Media caption Rescue workers abseiled down to those who were trapped and took them out one by one

Knotts Berry Farm was the 12th most visited theme park in North America in 2015.

The Sky Cabin broke down around 14:00 (22:00 GMT) on Friday, the Los Angeles Times reports.

After struggling to fix it, officials contacted the fire department, and crews arrived around 17:00 and also tried in vain to restart the ride.

At 19:30, they began extracting passengers using a safety harness as onlookers below clapped and cheered.

Image copyright Reuters Image caption The rescue took place high above the ground

Orange County Fire Authority Capt Larry Kurtz told Eyewitness News: "It sounds scary, but these guys, they train for this all the time.

"We have very, very strong ropes that have 9,000 pounds [four tonnes] of breaking strength on them."

The theme park said afterwards the Sky Cabin would stay closed until the causes of the breakdown had been established.