An industrial battle that has at times brought Australia's largest rail network to a halt is finally over.
The NSW government and the state's rail union struck a deal in the Fair Work Commission late on Friday, with commuters set to be spared further industrial action that has plagued the network for almost a year.
The deal gets the rail workers a 12 per cent pay rise over three years, with back pay also included.
The Rail, Tram and Bus Union (RTBU) had initially sought a 32 per cent pay rise over four years and a 35-hour working week, while the government had offered a 15 per cent figure over the same time frame.
Both parties labelled the new deal "fair and reasonable", with RTBU NSW secretary Toby Warnes pointing to crucial safety upgrades as fundamental to the agreement.
"All our rail workers ever wanted was an agreement that provides commuters with the safe and reliable rail network they deserve, and workers with the fair wages and conditions they deserve," he said.
"Our rail workers have been on the receiving end of some atrocious abuse throughout this process, but they've always held strong knowing that at the end of the day securing an agreement that ensures commuters get a safe railway and workers get fair wages and conditions is what is important."
Transport Minister John Graham claimed the result as a win for his government and said it was the responsible wage rise they had promised to deliver.
"This agreement will bring relief to the disruption from protected industrial action that a million daily rail commuters have been forced to endure while just trying to get to work and get around," he said.
"This process has strained the patience of train passengers ... this much-needed reset allows us to implement improvements for passengers with the full support of the rail workforce and unions."
The government said the deal delivered technological improvements that would boost recovery times after on-track incidents.
"For example, train crews will support the introduction of a new digital disruption management system that will end the current practice that relies on a manual system of phone calls and paper-based instructions during recovery from an incident," a government statement read.
After a number of industrial actions forced mass train delays and cancellations, the Fair Work Commission suspended the union from taking any more until July 1 before the agreement was struck on Friday.
Tension between the parties had increasingly grown, with former transport minister Jo Haylen repeatedly likening the RTBU to a boa constrictor for its ability to "strangle" and "squeeze the life out of the network".