Scotland's biggest teaching union has voted to accept a new deal on pay and conditions after a lengthy dispute.

The offer to teachers and lecturers by Scotland's council leaders includes a 2.5% increase in pay over two years, with 1.5% for 2015-16 and a further 1% for 2016-17.

The Educational Institute of Scotland (EIS) welcomed the "financial certainty" of the deal but said the "pay award itself is disappointing".

Earlier this year, the union put forward proposals for a 5% increase in salaries for 2015/16.

The EIS, which represents about 80% of Scotland's teachers, had previously threatened strike action after the failure of previous talks but members voted to accept the new offer by 83% to 17%.

EIS general secretary Larry Flanagan said: "Teachers have acknowledged the positive elements of the overall package and the degree of financial certainty that comes with a two-year agreement, even while recognising that the pay award itself is disappointing.

"That a meagre pay increase of 2.5% over two years actually exceeds current government pay policy demonstrates that teachers, in line with other public-sector workers, are continuing to pay the price for an economic crisis that was not of their making.

"The EIS remains committed to pursuing future restorative pay rises to return teachers' real-terms pay to at least pre- crisis levels."

Mr Flanagan said there had also been agreement with the Scottish Government on maintaining teacher numbers.

A Scottish Government spokeswoman said: "We welcome this positive ballot of the EIS members that recognises the work we've been doing together with the EIS and others to look at workload, bureaucracy and maintaining teacher numbers.

"We are committed to making sure councils have the right number and highest quality of teachers in our schools, and will continue to work together to make sure teachers have the freedom they need to carry on delivering our world-class curriculum.

"That is why we have offered councils £51 million, including an additional £10 million over and above last year's settlements, to support teacher numbers."