Trains have been on a reduced timetable while drivers refused to work overtime during a pay dispute.
ScotRail train drivers have voted to accept a 5% pay increase, union Aslef has announced.
Trains across Scotland have been on a reduced timetable for almost two months during a pay dispute.
ScotRail said if drivers begin doing overtime again a full timetable could return within 10 days.
Around 700 services were cut on 23 May when the dispute began and an emergency timetable was introduced.
Aslef Scottish organiser Kevin Lindsay said: “Following a ballot on the improved offer negotiated with ScotRail, Aslef members have voted to accept the proposals on pay and conditions.”
ScotRail drivers will see their pay climb by 5% and also get more money for rest day and Sunday working, driving instructor and maternity pay along with a policy of no compulsory redundancies for the next five years.
The nationalised train operator said 2.2% of the increase would be funded by Transport Scotland with the remaining 2.8% coming from ScotRail’s funds.
ScotRail came back into public ownership for the first time in 25 years in April, after previous operator Abellio had its franchise ended early over criticism of the quality of the service.
The emergency timetable in place since May has had a major impact on evening services and caused travel disruption for a number of events.
Fans at Scotland’s World Cup play-off against Ukraine at Hampden Park in June had to leave early if they wanted to take the last service home.
Audiences at TRNSMT music festival in Glasgow on Sunday were told they would miss last trains home if they stayed to watch headliner Lewis Capaldi.
Despite the dispute being resolved, the temporary timetable is expected to in place for up to 10 days while service levels return to normal.
Visitors to The Open in St Andrews have also been urged to avoid rail travel this week.
Johnnie Cole-Hamilton, director of championships at The R&A, said there was “a risk that fans who travel by train may find there are no services to get them home”.