The 11-year-old killed by a train on a rail bridge in Ngāruawāhia was playing with friends and unable to get out of the way when the train came through, Waikato's mayor says.
A freight train travelling from Hamilton to Auckland struck the girl about 6pm yesterday.
Mayor Allan Sanson said people jumping off the bridge into the river had been a safety issue for many years, but he understood the girl was not doing that, and was just playing.
KiwiRail had fenced off both sides and the entry to the bridge but they could not fence off the track, he said.
It had in the past considered electric gates over the track, he said.
Mr Sanson said he had been talking to locals recently about how to deal with kids jumping into the river from the bridge.
"It's probably something on the minds of people in Ngāruawāhia on a daily basis at this time of year...
"It's gone on for decades…There's a comment around town - it's called a rite of passage to jump off the bridge. These kids weren't jumping, just playing around."
"The community can't endure this kind of thing."
KiwiRail said it was a tragedy and the driver was distressed.
The driver has been stood down, as is standard practice after such a tragedy.
Kiwirail chief executive Peter Reidy said KiwiRail, police, and the council had all been trying to stop children getting onto the bridge.
He said Kiwirail had spoken to the community in a bid to stop children playing on the bridge.
"We've spent significant amount of money on fencing, anti-trespass measures, we have weekly inspections of the fenced areas, we've got speed restrictions on the line.
"This is a situation where the local youth will use cars to drag the fencing off."
Police said officers had been providing support to the family of the girl.
The girl's death is being referred to the coroner.