Extra funding will be made available to tackle the attainment gap in schools after the Scottish budget was approved at Holyrood.

Finance secretary John Swinney announced an additional £80m for the Scottish Government's Attainment Scotland Fund over the next three years as MSPs passed the budget by 64 votes to 57.

Mr Swinney said the new funding would "help ensure that every child has the opportunity to realise their potential" but he came under fire for cuts to council budgets that opposition parties said would harm education.

Trade unionists protested outside Holyrood before the final budget debate, arguing the local government settlement for 2016-17 represented a £350m funding cut that will hit schools and other services.

Councils reluctantly accepted Mr Swinney's deal, which includes a commitment to maintain the council-tax freeze and the pupil-teacher ratio in schools and provides £250m for integrating health and social care services.

Labour leader Kezia Dugdale branded the spending plans an "austerity budget" as she renewed calls for the Scottish Government to back her party's proposal for a 1p tax rise.

Defending his decision to keep the Scottish rate of income tax at 10p, the same as in the rest of the UK, Mr Swinney said claims thousands of public-sector jobs would be lost as a result of his budget were "utterly exaggerated".

He said: "It will be of limited reassurance to our pensioners or our newly-qualified teachers or our postal workers to know that people on higher salaries would be paying more in increased taxes than they will be as they see their weekly budget come under increased strain.

"They won't care that others are paying more, they'll care that they are paying more. That's not a burden that I'm willing to impose."

He told MSPs he intended to double the funds that remain to be spent through the attainment fund for schools from £80m to £160m over the next three years.

Additional measures in the budget include £200m for six new NHS elective treatment centres, a new 3% charge for buyers purchasing a second home or a buy-to-let worth more than £40,000 as well as commitments to protect college funding, continue free tuition and almost double free nursery provision during the next parliament to 1140 hours.

It also includes plans to increase spending on affordable housing by £90m, invest £130m in digital infrastructure and review the business rates system.

Ms Dugdale, who earlier joined the protest outside Holyrood, said: "The terrible toll of these cuts is there in black and white in the budgets being passed with heavy, heavy hearts by local councillors of all political colours. Our proposal is the only alternative to these cuts."

Conservative Murdo Fraser said he welcomed the SNP joining his party in "a new taxpayers' alliance, working hand-in-glove to protect hard-pressed working families against the tax grabbers in the Labour and Liberal Democrats".

"I would encourage SNP members to oppose Labour's tax grab, not on the detail, but on the principle, for in doing so, they will have the public on their side," he said.

Green co-convener Patrick Harvie said his party was "deeply concerned" about the budget's "dramatic reduction in effort" on climate change, energy efficiency and fuel poverty.

He called for the continued investment in an "unsustainable transport infrastructure" to be reversed.