Ms Ferguson said social media had played a role in identifying the suspects, and thanked the community for their help. However, she said social media could also encourage copycat acts.
KiwiRail Metro General Manager, David Shepherd said KiwiRail would liaise with police over reparation.
"KiwiRail takes incidents like these very seriously and has robust systems in place to help us identify trespassers and follow up with police to then prosecute within the full extent of the law.
"These youths are lucky to be alive after pulling such a dangerous stunt".
Manager of TrackSAFE NZ Megan Drayton said trespassing on the rail corridor was the leading cause of public railway fatalities in New Zealand.
"Trains, particularly the electric ones in Auckland and Wellington, are deceptively quiet and so we urge people to only cross at level crossings, where protections such as signs or signals are in place to keep them safe."