Scotland's largest teaching union, EIS, has 'overwhelmingly' accepted the latest pay deal.
The ballot saw a 82% turnout, with 90% voting to accept the offer.
Educators will receive a 7% rise backdated from last year, a 5% rise this year and a 2% increase from January 2024.
The acceptance of the offer will see the end to a long-running series of strikes.
EIS General Secretary, Andrea Bradley, said: "EIS members have voted overwhelmingly in favour of the current pay offer, with 90% of those voting opting to accept in an online ballot.
"Turnout in the ballot was also high, confirming that Scotland's teachers believe that it is now time to accept the offer and bring an end to the programme of industrial action in our schools."
The union initially requested a 10% pay rise, but education secretary, Shirley-Anne Somerville said this was "unaffordable".
Ms Bradley continued: "It is deeply regrettable that it took a sustained industrial dispute, and the first programme of national strike action on pay by teachers in forty years, for the Scottish Government and COSLA to finally come up with an acceptable pay offer for Scotland's hard-working teaching professionals."
"Scotland's pupils, parents and teachers deserve better, and the Scottish Government and Scotland's local authorities must commit to ensuring that education is properly funded, and that teachers are fairly paid, in all future years in order that Scottish education can provide as it should for our young people and for the good of our whole society."