This photograph, provided by Prince George's County Fire Deptartment, shows firefighters reaching riders stranded on a roller coaster at Six Flags America in Upper Marlboro. Picture: Marc Bashoor, Prince George's County Fire Department

Upper Marlboro, Maryland -

Authorities say 24 people stranded on a roller coaster have been rescued from near the top of the ride at Six Flags America in Maryland.

Prince George's County Fire officials say it took about five hours on Sunday to rescue 17 adults and seven children from The Joker's Jinx roller coaster.

Assistant Fire Chief Paul Gomez says the riders were sitting upright. A few had cramps, back pain and dehydration, but there were no major injuries.

A Six Flags America spokesman said in a statement that it is not yet clear what caused the ride to stop, but that it has a computerised safety system that “performed as it is designed to”.

Six Flags' website says the ride goes as fast as 96km/h and turns upside down four times. - Sapa-AP