Alarming gaps in pupil attainment across Scotland have been exposed by one of the most comprehensive analyses of school performance ever undertaken in the country.
The Audit Scotland report also shows teachers coming under immense pressure from shrinking budgets, and warns councils to assess the impact on staff and pupils before making further cuts. Attainment has increased nationally according to every measure, but figures fluctuate "markedly" between local authorities, the analysis shows.
In 2013, only 28 per cent of S4 pupils in Clackmannanshire and Dundee achieved five awards at level 5, compared with 71 per cent in East Renfrewshire. Scotland's best result also came here, with 81 per cent of S4s at one school achieving five level 5 awards. In one Edinburgh school, by contrast, no S4s did so.
East Dunbartonshire experienced a 15 per cent improvement in the 10 years to 2013 against a national average of 4 per cent. Meanwhile, there was a 4 per cent drop in Aberdeenshire's results.
The study shows that the attainment gap between the lowest- and highest-performing schools in the same authority is increasing in more than half of councils. Glasgow and Aberdeen had the joint widest gaps, at 74 percentage points.
"Performance has improved against all 10 of the attainment measures we examined over the last decade," the report says. "However, there is significant variation in attainment between individual councils, schools and groups of pupils."
Poverty has a profound influence, but some schools are doing better than deprivation levels would suggest, the report adds.
And spending more does not guarantee a better performance. Councils have greater success where they target resources at the lowest-performing pupils, the document says. Those making the biggest improvements focus on leadership, teacher quality and systems for monitoring and tracking pupil data.
Audit Scotland advises councils to improve their planning and strengthen the role of elected members, who, it says, do not scrutinise education reports thoroughly enough.
The body also criticises councils for focusing on performance in the upper secondary years but having "no consistent approach" to tracking and monitoring the progress of pupils from P1 to S3. Most P7s perform well but "performance is not sustained into secondary school," the analysis warns.
John Stodter, general secretary of education directors' body ADES, said similar gaps in attainment existed in other highly developed countries, but that in a small country like Scotland "the disparities are very evident", with attainment levels closely linked to "huge disadvantages in terms of poverty".
But he also underlined that some schools and authorities were combating poverty effectively. "It's not a life sentence to be poor," he said, adding that success came from "hard-headed and studied approaches", consistency in schemes dealing with literacy and numeracy, and by targeting staff, training and resources at specific issues.
Mr Stodter said that Scotland should consider a robust system of national benchmarking, and that local authorities had to improve at pooling ideas and resources with other councils.
As well as the worrying gaps in pupil attainment, the report also highlights the extent of funding cuts across Scotland. Overall, school expenditure fell by 5 per cent in real terms in the three years to 2012-13 but by as much as 14 per cent in Clackmannanshire. The authors say they have gathered merely a "snapshot"; some councils may simply have started cutting earlier.
Spending on teachers across Scotland dropped by 7 per cent in real terms over three years but by 19 per cent in Stirling. Overall, teacher numbers fell by 815, or 2 per cent.
The report argues that public sector finances will "continue to be under pressure for the foreseeable future". Looming issues include problems with the school estate: 18 per cent of schools remain in poor or bad condition.
Although the authors say that cutting staff is an "obvious way to reduce spending", they also predict dire consequences if this is taken too far, including increased sickness absence and low morale. Moreover, they suggest that councils must "understand the longer-term effect that budget reductions could have on efforts to raise attainment among pupils".
Larry Flanagan, general secretary of the EIS teaching union, said the report highlighted "the significant real-terms cuts to education budgets over the past few years".
"This is a continuing problem and so schools are likely to continue to face serious challenges as they endeavour to deliver a consistently high level of provision at a time of declining resources," he said.
A Scottish government spokeswoman was more positive, saying: "We welcome this report, which finds that educational attainment in Scotland has improved. New figures published this week show the proportion of school-leavers staying in a positive destination after leaving school reached 90 per cent in March 2014 - the highest level on record."
Maria Walker, director of education and children's services at Aberdeenshire council, said it was "clearly disappointing" that improvement levels in Aberdeenshire's S4 pupils had fallen over the past decade.
But she added that it was important to stress that the council had seen improvements in a number of measures "not specifically highlighted in the report".
"For example, recent evidence suggests that Aberdeenshire is making progress in addressing inequalities in levels of attainment between areas of relative deprivation and affluence," she said.