ScotRail workers have voted to accept a deal to end a long-running dispute over driver-only trains.

Members of the Rail, Maritime and Transport (RMT) union backed the proposed agreement by 10-1.

The deal includes a guarantee that a conductor will be retained as the second member of staff on board new trains being rolled out next year.

The RMT has been protesting at the possibility of new electric train lines operating without guards, leading to several days of strikes over the summer.

The union said the settlement retains the safety critical role of guards.

General secretary Mick Cash said: "Our members have backed a deal in a referendum ballot that is a major victory in the fight to stop the compromising of rail safety through the extension of Driver Only Operation.

"This deal, which represents a benchmark for the industry, is exactly what we have proposed as a resolution to the Southern dispute.

"If it's good enough for Scotland, it's good enough for the south of England.

"The deal guarantees a guard on every new electrified train and that the conductor will retain their full competency including rules, track safety and evacuation.

"In addition, ScotRail confirm that trains operating these services will not run without a competent conductor onboard.

"The agreement has been reached after a campaign of industrial action and after intense negotiations and shows what can be achieved when management and unions get down to serious talks. That lesson should be a wake-up call to Southern Rail."

ScotRail Alliance managing director Phil Verster added: "I am pleased we have reached an agreement with the RMT and ASLEF unions that brings this dispute to an end.

"This ends the uncertainty for our people and our customers and allows us to concentrate on delivering the best possible service for Scotland, every single day.

"What we have put forward will make our service more efficient and more effective, while maintaining and enhancing the service we provide to our customers. It means that the new faster, longer, greener trains that will arrive in autumn next year really will be a revolution in how we deliver our service."