SYDNEY, Australia -- Dozens of people helped rescue a fellow commuter in Australia by pushing against train carriages to free the man whose foot had slipped between the platform and the train.

Closed-circuit footage released by the Western Australia State Public Transport Authority showed the man lost his footing while boarding the train at a station in the city of Perth on Wednesday.

A passenger alerted railway staff who stopped the train from leaving, local media said. When railway workers realized the man's foot was stuck in the 5-centimetre gap, they called on other passengers to help.

The footage showed dozens of people rushing to help tilt the carriages to free the man.

"It's really heartwarming I think, to find an incident like this where everyone pitched in," transport authority spokesman David Hynes said.

The man wasn't named, but local media reported that he was believed to have escaped injury and caught the next train.