A man got his leg stuck while boarding a train in Perth, Australia today – and passengers helped to free him.

Video released by the Public Transport Authority of Western Australia shows the man’s leg becoming wedged between the train and platform at the city’s Stirling Station. Workers were alerted and spent the next 10 minutes trying to free the man.

Crowds grew, watching. The crowd came in handy, pushing against the side of the train, tilting the train car so the man could free his leg.

People clapped when the man’s leg was freed, and the train was on its way a few minutes later. The man’s injuries aren’t believed to be serious.