Scottish students' success in school is becoming less dependent on their social and economic background, figures from the world's most influential education survey show.
The latest Programme for International Student Assessment (Pisa) results from 2012 reveal that the "achievement gap" between rich and poor students in Scotland has closed in maths, reading and science. The proportion of students failing to achieve the most basic level in reading has also dropped.
In addition, the variation in student performance that can be attributed to differences in socio-economic background is now only 13 per cent, a fall of 5 percentage points since 2003.
The proportion of Scottish students classed as "resilient" - meaning they come from disadvantaged backgrounds yet exhibit high levels of school success - is, at 8 per cent, slightly above the Organisation for Economic Cooperation and Development (OECD) average.
The news comes six years after an OECD report said: "Who you are in Scotland matters more than what school you go to."
Michael Davidson, head of the OECD's schools division, said that although the overall performance of Scottish students was similar to the last time the tests for 15-year-olds were carried out in 2009, the results showing the influence of home life were "not trivial" and were evidence of "real improvement".
"The results show the relationship between social background and success in school is headed in the right direction," he said.
Mr Davidson's comments were echoed by Alasdair Allan, Scottish minister for learning, who said there was "clear evidence" that the attainment gap was being addressed.
He acknowledged that in Scotland students from better off homes scored on average 37 Pisa points higher in maths than poorer classmates - equivalent to nearly a year of schooling.
However, in 2009 that figure was 45 points. Similar drops are evident over the same period in reading and science.
Mr Allan said: "While we know that Scottish education is good, we want it to get even better. Under Curriculum for Excellence, we have evidence of high standards of achievement in primary schools and I am confident that we will see continued progress in future years."
The impact of CfE will not be evident until the next round of Pisa, the Scottish government has stressed.
David Raffe, professor of sociology of education at the University of Edinburgh, said that the most important role of the 2012 Pisa results would be as a baseline for assessing the effect of the new curriculum.
Graham Donaldson, former head of the inspectorate and an honorary professor at the University of Glasgow, said that the fall in the proportion of 15-year-olds with a reading ability below level 2 - the level needed to participate effectively in society - was also evidence of a closing of the attainment gap.
About 12.5 per cent of Scottish students were classed as below level 2 for reading in 2012, compared with 16.3 per cent in 2009 and an OECD average of 18 per cent.
However, Professor Donaldson warned against complacency. "These figures give some reinforcement that Scotland is moving in the right direction but they should also give us a shove," he said. "We need to redouble our efforts."
Professor Christopher Chapman, director of the recently unveiled Robert Owen Centre for Educational Change at the University of Glasgow, said the results were encouraging but there was still a lot to do.
Further progress on closing the attainment gap depended on improving the quality of learning and teaching in Scottish classrooms, developing partnership working between schools and local authorities, and making better use of data to inform practice, he said.
The Pisa survey of maths, reading and science is conducted every three years. The 2012 assessments in Scotland involved 2,945 students in 111 secondaries.
They show that Scotland is above the OECD average for science and reading and around the OECD average for maths. The country outperforms the other UK home nations in everything but science, where England is three points ahead.
However, Scotland is still recovering the ground lost in previous rounds of Pisa when scores were higher in maths and English. In science, performance has remained steady.
The countries that tend to top the Pisa charts include China, Singapore, South Korea, Estonia, Finland and Canada.
See Feature, pages 18-22
Like for like
Countries with similar scores to Scotland in the three areas:
Maths England, France, New Zealand, Australia
Reading England, France, New Zealand, Australia
Science England, New Zealand, Switzerland, Czech Republic
UK's position overall out of 65 in the 2012 world rankings: