Southern Railway drivers have voted by 4-1 to accept a deal to end their long-running dispute over driver-operated trains.
Members of Aslef backed the deal, which includes a 28.5% pay rise over the next five years, by 731 votes to 193, a majority of 79%.
Turnout in the ballot was 87%.
Mick Whelan, general secretary of Aslef, said: "Our members on Southern, after careful consideration, and long and hard negotiations, have voted to accept this resolution to our industrial dispute with the company.
"We are pleased with a resolution which, we believe, works for the staff, and the company, and we now look forward to working with Southern Rail to restore good industrial relations and deliver the service passengers in the region deserve."
The dispute started in April last year, leading to a series of strikes by drivers which crippled services, causing huge disruption for Southern's 300,000 passengers.
The announcement was made as members of the Rail, Maritime and Transport union (RMT) on Southern, and four other train operators, went on strike in a separate dispute over the role of guards.
Mr Whelan said the agreement means there will be a second, safety-trained person on every train except in "exceptional circumstances", such as a member of staff calling in sick just before a shift or being taken ill during work.
He said: "That person will have all the relevant safety competence, including the skills to evacuate passengers in an emergency.
"The agreement gives our drivers the security of a five-year pay deal, which covers the October 2016, 2017, 2018, 2019 and 2020 pay settlements, through to the end of the franchise.
"It's important to stress that this deal is company-specific and does not have implications for any other train operating company on Britain's railway network.
"After one-and-a-half years of industrial strife we wanted to find a way forward for our members who work on the railway in this region, for the passengers who use Southern trains, and for the businesses which depend on the service, as well as for the company, too.
"This deal is a resolution to an 18-month long dispute. It is not a template for Britain's railway in the 21st century."
Paul Plummer, chief executive of the Rail Delivery Group, representing train operators, said: "This decision leaves the RMT leadership completely isolated. The travelling public will not thank them for another round of disruptive and unnecessary strike action.
"The RMT should work together with rail companies to deliver the industry's plan to improve services for passengers, communities, the country and their members.
"This agreement shows that unions can be a part of a bright future for the railway, supporting the industry to deliver its plan to improve for passengers with more jobs in rail, including safety-trained staff on trains and at stations."
Nick Brown, chief operating officer of Govia Thameslink Railway, Southern's owners, said: "This dispute has been difficult for our passengers in particular and we are pleased that we can now move ahead and deliver stability by finally concluding this deal with Aslef.
"Our trains will be planned to have a second person on board and this has been the arrangement we have operated over the last year. More on-train staff are on more trains with more passengers than ever before. The on-board service concept has been welcomed by our passengers across the board.
"Should, in certain circumstances, a train not have that second person on board then it will still be able to run until a replacement can be provided. Avoiding cancellations is key to us delivering a resilient and reliable service across the busiest and most congested part of the UK rail network."
RMT general secretary Mick Cash said the result did not change his union's campaign.
" This shoddy deal extends and institutionalises discrimination against disabled and older people.
"Where such passengers who required assistance were once guaranteed a second member of staff to assist, a new clause in this deal deliberately sets out where there is no on-board supervisor the driver will knowingly have to leave such passengers stranded on trains and stations. That is frankly appalling.
"RMT believes that a significant factor in delivering this result was the threat of massive legal costs levied on the union by GTR as a result of the anti-trade union laws."
Copyright (c) Press Association Ltd. 2017, All Rights Reserved.