More than 2500 rail workers have agreed on a two-year collective contract.
The two-year deal has staff at NZ Railways Corporation, Ontrack and KiwiRail earning pay rises of 1.2 per cent in the first year, backdated to June 30, and 2 per cent in the second year.
It comes in a year where several staff were made redundant at KiwiRail's Hillside workshop in Dunedin and its infrastructure and engineering division, and with the Gisborne-Napier line facing closure.
"In the midst of significant budget cuts at KiwiRail, rail workers were of the view that this was the best offer available," Rail and Maritime Transport Union general secretary Wayne Butson said.
He said rail was a critical part of New Zealand's transport infrastructure and said the job losses wouldn't be necessary if the government took rail seriously.