Bright fourth year pupils in Scotland from poor backgrounds lag more than two years behind their richer peers educationally, according to a new report.

The Sutton Trust found a gap equivalent of more than two years in schooling for science, reading and maths between poor pupils in the top 10% of achievers nationally compared to their equally clever but well-off counterparts.

The analysis uses the latest results from international Pisa tests to examine the performance of 10% of the most able pupils in England, Scotland, Wales and Northern Ireland, taking into account their background.

In the past decade the gap in science performance between all pupils in Scotland has increased by around a year of schooling, described in the report as a "major weakness".

The report found smart but poor pupils lag behind their better-off peers by around two years and seven months in science and maths, and by around two years and two months for reading.

Researchers also found skills for the most able pupils in Scotland have been declining since 2009.

The Scottish Government said the report "adds to our understanding of some of the challenges we want to address" in attempts to close the attainment gap.

Report author John Jerrim said the research showed some "very big challenges" for Scotland.

The report states: "Scotland has few stand-out strengths when it comes to the performance of its most able pupils.

"It stands around the OECD median in science, while the size of the gap between able advantaged and disadvantaged children does not stand out as particularly large or small relative to other countries.

"However, there is no specific area where able children in Scotland really excel.

"The major weaknesses include a pronounced and sustained decline in able pupils' performance in science, equivalent to around a year of schooling, over the last decade.

"It is also below the median OECD country in reading and mathematics, while trailing behind the performance of able pupils in England in most subject areas."

A Scottish Government spokesman said: "We welcome this research. It adds to our understanding of some of the challenges we want to address in our determination to close the attainment gap over the next ten years.

"Having accepted all the recommendations in the Widening Access Commission's Blueprint for Fairness, we have already recognised the role that universities could play in supporting highly able school pupils to achieve their potential by working with schools to develop programmes to support them.

"This government is already taking action to ensure that every child, no matter their background, has the chance to succeed by implementing a range of measures to strengthen our education system and to give every child an equal chance of going to university."

Scottish Labour branded the findings a "scandal".

The party's education spokesman, Iain Gray, said: "The SNP government should be ashamed of these figures.

"Nicola Sturgeon said education would be the defining priority of her government; she put her top minister in charge of it and has announced a stream of schemes but the gap between the richest and the poorest most able pupils is more than two and a half years.

"In Scotland today how much money you have means that, even for the ablest pupils, they can be two and a half years behind the richest pupils in key subjects like maths and science.

"That is a scandal and a ticking timebomb for our economy."