TURNING school placements into a lottery would help close the attainment gap in Scotland, it has been claimed.

Educational charity, the Sutton Trust, says a ballot should be held to determine around 50% of places at all state secondary schools.

It also wants a system “with fewer incentives for middle class parents to buy homes in the catchment areas of top schools”.

The Trust says this would help more pupils from poorer families into the best-performing secondaries and overcome educational disadvantage.

Sir Peter Lampl, founder and chairman of the Sutton Trust, said: “Getting a place at a good school is key to getting on in life. Yet the bottom line is that in Scotland your chances of doing that depends on your parents’ income and whether they can afford to live in an affluent area.

“This is why we want to see more use of ballots - where a proportion of places is allocated randomly – as well as a focus on improving the quality of teaching in all schools."

Today's report, carried out by the National Foundation for Educational Research, found four in five of top schools are situated in the 40% richest areas of the country.

And while an average of 16% of pupils receive free meals at the country’s secondaries, this drops to just 8% at the top 70 state schools.

They were selected for the study due to the proportion of pupils getting four A-C grades in their Scottish Credit and Qualifications Framework (SCQF) level five qualifications.

Almost 60% of these schools teach slightly fewer disadvantaged pupils than their catchment area, while 40% have slightly more.

According to recently published Higher pass rates, the country’s best performing schools include Dunblane High, Boroughmuir in Edinburgh and St Ninian’s in East Renfrewshire.

Families pay a premium for properties within the postcode district of these secondaries, some paying two thirds more than the local average house price.

Ex-teacher Iain Gray MSP, Labour’s shadow education secretary, hit out at the “shocking attainment gap between the richest and poorest children” and said a generation is “being left behind despite the promises from SNP politicians”.

However, he stated: “Scottish Labour strongly supports local schools serving their local communities, and does not support changing that.”

Cabinet Secretary for Education and Skills, John Swinney, said: “This report highlights that the poverty related attainment gap is faced across the UK."

He added:“We want to see excellence for every pupil, in every school, and are investing £750 million in the Scottish Attainment Challenge to narrow the gap between pupils from the most and least deprived communities. Latest data shows improvements with the gap closing among pupils at Higher level and among young people going on to study, train or work.

"Schools should serve everyone in their community, and a ballot process would completely undermine that link.”