The Scottish Government said Pupil Equity Funding (PEF) totalling £520 million will be distributed to schools in every council area to help headteachers put in place more support for children and young people.
The funding has been confirmed for multiple years in a bid to provide more certainty for headteachers and allow for longer-term planning.
Education Secretary Shirley-Anne Somerville said: “Tackling the poverty-related attainment gap and giving every young person the chance to fulfil their full potential remains our priority, and we are investing an increased £1 billion through schools and local authorities over the course of this Parliament to support this ambition.
“Our headteachers and teachers know their pupils best and have told us that our measures are working.
"We are determined to ensure they are empowered to take the approaches that are right for the children and young people in their schools to help improve attainment.
“Our allocation of more than £520 million of PEF for the next four years will give headteachers the confidence and security they need to plan long term.
"However, we know schools can’t do this alone, and headteachers should work in partnership with each other, Education Scotland and their local authority, to agree the use of the funding.”
Margot MacAlister, headteacher of St Francis Primary School in Edinburgh, welcomed the funding.
She said: “Pupil Equity Funding has been key in allowing me to deliver my vision for the community I serve.
“From the beginning it has provided me with stability in terms of funding posts previously reliant on my devolved budget.
“This has allowed me to build purposeful and trusting working relationships with partners over time that bring a great richness to a child’s learning experience.”
PEF is allocated directly to schools and targeted at closing the poverty-related attainment gap, with 97 per cent of schools in every council area benefiting.
A 2020 headteacher survey found 90 per cent reported they had seen an improvement in closing the gap in their schools in the past five years.