A freight train needed repairs after it broke down in the 8.9km Kaimai Tunnel in Bay of Plenty yesterday.
The driver had to walk out of the tunnel to alert authorities after the train's brake became locked and could not release.
A KiwiRail spokeswoman said a repair crew was able to get the train up and running again about 45 minutes later.
There were no delays to other rail traffic.
The Kaimai Tunnel runs through the Kaimai Range near Tauranga.