Runaway train in India leaves passengers panicking for miles as 'ghastly' accident avoided

Nearly two dozen crowded Indian train cars rolled backwards for almost an hour after their brakes failed Saturday, a perilous and unexpected journey that resulted in disciplinary actions and an official investigation.

India's state-run railway said it has suspended seven workers and launched an investigation Monday into how the 22 carriages became separated, Sky News reported

"Something ghastly could have happened and it was averted by alert staff," Railway Ministry Spokesman JP Mishra said. 

The train was traveling from the western state of Gujarat to Odisha in the east when the incident took place. Brakes that were supposed to stop the train when carriages are uncoupled were either not set or applied incorrectly, according to Sky News. 

The dramatic scene was captured on video by a passenger at a train station, and shows the moment the train cars slowly roll by as onlookers shout to the passengers aboard.

The train cars traveled for about 45 minutes before slowing to a halt, thanks to staff members who placed wooden wedges on the tracks, an unnamed senior railway official told Reuters

NEW HIGH-SPEED FLORIDA TRAIN KILLS 4TH PERSON SINCE LAUNCHING SERVICE

India's Ministry of Railways said in a Facebook post it was an "isolated incident of staff negligence that is sincerely regretted by the railways."

"While the concerned staff has been suspended and a high level inquiry has also been ordered, the railways remains committed to ensuring highest levels of safety in train operations," the statement said. "We have also ordered a one month long drive over the entire network for sensitizing the staff regarding the precautions to be taken to prevent such incidents."

The incident on Saturday was the latest in a series of accidents involving the world's fourth-largest rail network.

FILE PHOTO: Passengers board an overcrowded train at a railway station in Ajmer, India, October 23, 2016. REUTERS/Himanshu Sharma/File photo - RC1C8023D480

Passengers board an overcrowded train at a railway station in Ajmer, India.  (Reuters)

In February, four elephants were killed after they were hit by a train traveling from Guwahati to Silchar, Sky News reported.

In a similar incident in November, two endangered Asian elephants were hit and killed by a passenger train near the city of Gauhati in northeastern India. Roaming elephants in the region are struck by trains fairly regularly.

The Associated Press contributed to this report. 

Travis Fedschun is a reporter for FoxNews.com. Follow him on Twitter @travfed