Commuters and onlookers sprang into action after the teenager's leg got stuck. In the incredible video below, you can see how they work together to lift the train so the girl's leg can be pulled out.
The video goes dark as the person filming seems to be helping with the effort. You can hear the girl's scream of pain, and then hear her say "thank you" to her helpers. The video comes back, and you can see that she is sitting safely on the platform.
Tap to see video if you're viewing on news app.
The Irish Independent reports that 16-year-old Maja Dabkowska had her headphones in, was rushing to catch her bus for school and didn't notice the Luas train coming as she made her way across the tracks. When she finally saw the oncoming train, she tried to scramble off the tracks, but her leg did not make it in time, and it got wedged in the space between the Luas and the platform.
Dbkowska posted a public picture of her injuries on her Facebook page. She thanked those that came to her rescue, saying, "No words to describe how thankful I am to all the people that picked the Luas up in order to get me out."