A new report has found that 84 of Scotland’s primary schools ensure that almost ever primary seven pupil is up to standard in reading, writing, numeracy, listening and talking.
The Sunday Times report used data submitted by schools in each of the four categories to come up with a mark out of a maximum of 400.
Read more: Prestigious international school that claimed steady pupil numbers could shut over falling roll
A total of 1,197 primary schools provided data for the annual Achievement in Curriculum for Excellence Levels publications, with the remaining 729 on the government database not participating, either because no children were up to standard, the school roll was too small or the data was not collected centrally.
Schools with a higher proportion of deprived pupils were weighted to rise up the league table to recognise their achievement in delivering a good education despite the challenges of poverty.
The schools were then placed in a league table according to how well they were performing.
In the area covered by Midlothian Council a total of 14 primaries received at least 350 points - with none scoring full marks.
Here are all 14 of the top performing primary schools in Midlothian.
Make sure you don't miss a moment of breaking news from across Scotland by signing up to our free newsletter here.

1. St David's RC Primary School
St David's RC Primary School, in Dalkeith, is the best performing primary in Midlothian, scoring a near-perfect 390 out of 400 points in the report - just dropping 10 marks in the numeracy category. Between 10-20 per cent of the school's 179 pupils come from 'very deprived' backgrounds according to the Scottish government’s index of multiple deprivation (SIMD). | Google Maps

2. Stobhill Primary School
Stobhill Primary School, in Gorebridge, was one of two Midlothian primaries to score 380 points in the report - dropping 10 marks in each of the numeracy and reading categories. Fewer than 10 per cent of the school's pu[pils come from backgrounds classed as 'very deprived'. | Google Maps

3. Cornbank Primary School
Penicuik's Cornbank Primary School dropped 10 marks in each of the numeracy and writing categories to earn 380 out of 400 points in the report. Fewer than 10 per cent of the school's pupils are classed as 'very deprived'. | Google Maps

4. Lasswade Primary School
Two Midlothian primaries scored 370 points in the report, with Lasswade Primary School in Bonnyrigg dropping 10 marks in each of the numeracy, reading and writing categories. Fewer than 10 per cent of the school's pupils come from 'very deprived' families. | Google Maps

