An 11-year-old was playing with friends when they heard or saw a train coming towards them in Ngaruawahia.
However, the girl wasn't able to get out of the train's way quick enough and was hit, and knocked to the ground below.
The accident happened about 6pm last night near the bridge on Great South Rd, not far from Old Taupiri Rd, in Ngaruawahia.
Western Waikato police area prevention manager Senior Sergeant Dave Hall said the victim was with a group of friends at the time and it's unclear if they heard the horn first or saw the train before they started running.
"From what we can establish it looks like they were on the tracks and have seen or heard the horn from the train from the south, as it was heading north, and they tried to run along the tracks," he said.
"As the train has reached the north end of the bridge it struck one girl and has knocked her from the railway lines and she has fallen on to the ground beside the track and has died at the scene as a result of her injuries."
Some of the girl's family arrived at the scene shortly afterwards, Hall said.
A post-mortem examination would be carried out today.
Hall said he was unsure which family members managed to get to the scene, and what their relationship was to the victim.
"Staff were talking and working with the family and the process around it."
He said the girl's family weren't far from the scene when the tragedy occurred as they got to the scene pretty quickly.
It was the first death on the tracks at Ngaruawahia since 2002 when 9-year-old Jayden Nerihana Tepu died when he lost his footing on the bridge and was struck by a train.
Hall was unsure how many near misses there had been.
"In conjunction with KiwiRail, we've been working to educate people that the train tracks and the bridge is not a safe place to be for kids to play on and trying to encourage, by way of education, to stay away from the bridge itself."
He said despite it being a long hot summer, anecdotally, the number of complaints about people being on the bridge had been low compared to previous years.
"Up until now we haven't been receiving as many complaints as we have had in the past. It had eased off in relation to bridge jumpers and people in the tracks.
"It has already been calmer but this is a tragedy right at the end of summer."
He knew that amongst some locals that playing on the bridge was almost a right of passage, but police had been working to inform locals of the risks.
"It's an ongoing piece of work."
A man, who only wanted to be known as Jeremy, lives near the tracks where the girl died.
He came from a family of rail workers and had lived there on an off for 30 years.
He said young people played on and around the tracks "all the time".
While he wasn't home when yesterday's incident occurred, he said it was sad but preventable.
He believed parents needed to have more accountability about where their children were.
"If they haven't stopped by them [kids] now they're probably not going to stop them."
As for the speed of the train, he said the train managed to stop not too far north of the scene which indicated it wasn't speeding.
He said train drivers had been told to go even slower through the town due to the number of children that were known to be on the tracks.
"They have speed restrictions through town anyway and if you think about a 100 tonne train it doesn't matter if it's going 50km/h or 100km/h at 50km/h you're going to take a long time to stop. But he wasn't going that fast... he can't stop and reverse."
He wanted parents to be more accountable for where their children were.
"It's the parents though isn't it. You wouldn't let your kids play on the expressway would ya, you wouldn't let them play on a motorway full of trucks. It's the same thing isn't it."
Many measures have been taken to ensure children do not climb on to a rail bridge in Ngaruawahia, but fences are pulled down and young people ignore the warnings, KiwiRail chief executive Peter Reidy says.
Higher fences, trespass notices and even a speed restriction for trains have been put in place but they don't work, Reidy says.
"Young children are accessing the track to jump off the bridge [into the river], so this [death] has been many years in the making," he told RNZ on Monday.
"Youth will use cars to pull the fencing off and even if we restrict the speeds, they climb on the trains and jump off them."
Reidy said police, the local community, council and KiwiRail will meet to discuss further measures and more education for local people about using the bridge to dive into the river.
He said another bridge is an option, but that would still be used to walk over or dive off in the same manner.
"The key, for us, is to limit the access to the railway line."
Waikato District Mayor Allan Sanson said one of the councillors lives near the scene and went down to see what he could do.
He said the sight of the grief-stricken family members was unbearable.
"It's not easy these things, they tear a community apart in relation to the tragedy and that it shouldn't happen but it has happened and we'll have to deal with it."
Sanson said he found out about the incident about 10 minutes after it happened on social media.
As for what could be done to make the area safer, Sanson said people gathering at and around the bridge had been happening for decades.
"This has been a problem here that's been here for decades and it's almost inter-generational. There's people in this community that think this is a right of passage issue.
"I don't think it's ever been right to jump off the bridge at any time at all."
As for the speed of trains, Sanson said he had noticed them travelling slower in recent times.
"The trains have actually slowed down here because of the kids on the bridge so they've really buttoned it back in relation to speed."
He said, together with police and KiwiRail, they had been helping educate kids about the dangers of going into the bridge.
"KiwiRail have spent a huge amount of money putting up fencing and a barrier and that sort of thing but you can't put a gate on a track and you can't put a gate on a road... the only thing we've got left for us is more education, more awareness next to putting security guards at either end of the bridge and I don't think we should have to go to that level."
He hadn't had a chance to get out into the streets yet today, but a lot of staff were local and they were saddened by what happened.
His final message for young people was simple - "stay off the bridge please".
"I don't want to be doing this again it's not a nice part of my job ... I don't know where to go with this at the moment, it's really got to stop.
"It is tragic but it is avoidable ... and we just need to change some attitudes."
He offered his condolences to the victim's whanau and friends.
- with NZN