Workers at Iarnród Éireann have accepted the latest proposals aimed at resolving the long-running dispute over pay cuts.
Workers at SIPTU voted 70-30 to accept the proposals, while there was a 61-39 result at the National Bus and Rail Union.
The dispute led to a two-day strike in August, which caused disruption to passengers and cost the company more than €500,000.
It has been 21 months since the company first proposed pay cuts ranging from 1.7% for staff earning less than €56,000 to 6.1% for those on over €100,000.
At the time, the company was targeting savings of around €33m.
However, after arduous and lengthy negotiations, the duration of pay cuts has been reduced to 25 months.
The company has promised not to seek further pay cuts during that period and set up procedures to allow all-party engagement including the National Transport Authority.
However, the dispute has cost the company dearly.
The two days of industrial action in August cost the company more than €500,000, even allowing for the savings on wages.
The savings target has also been halved to around €16m.
NBRU General Secretary Dermot O'Leary said: "In advance of our ballot we conducted a comprehensive consultative process with our members.
"They have made it abundantly clear that they intend to hold the company to account in relation to addressing waste and extracting significant savings from the large non-payroll cost base.
"We are equally determined to engaging with the National Transport Authority (NTA) to achieve a route towards matching service levels with the appropriate and vital Government funding required to provide a modern public rail transport service."
SIPTU organiser Paul Cullen, said: "SIPTU will now formally write to the company advising it of this result.
"Our members have accepted further pay cuts amidst growing anger with management in relation to its failure to adequately contain other costs at the company.
"Our members expect the company and the Government to now live up to their commitments in relation to the LRC proposals."
Iarnród Éireann said: "The company welcomes the acceptance of these proposals by SIPTU and NBRU.
"Together with the previous acceptance of the temporary pay reduction by TSSA, TEEU and UNITE, this represents a strong commitment by colleagues across the company to the future of Iarnród Éireann.
"Most importantly, the acceptance ensures that customers will not experience further disruption from industrial action, as occurred on 24th and 25th August last."
Minister for Transport Tourism and Sport Paschal Donohoe said: "I welcome the outcome of the ballot this afternoon of both SIPTU and the NBRU unions at Irish Rail.
"I recognise the contribution this makes to the future viability of the company as it seeks to address the financial challenges that lie ahead.
"I would also like to acknowledge in particular the work of the Labour Relations Commission in working with the parties to bring this dispute to a resolution."