Fewer than three out of five youngsters leaving primary school in Scotland’s most deprived areas achieve the expected standards in literacy.

Just two-thirds of these pupils are meeting the expected level in terms of numeracy.

New data on pupil achievement was published at the same time  as union leaders complained about the “growing teacher recruitment and retention crisis” in Scotland’s classrooms.

Scottish Government statistics showed schools employed the full-time equivalent (FTE) of 51,138 teachers

The total of 24,899 FTE primary teachers is the highest since 1980, the government said.

Overall teacher numbers, including those working in early learning and childcare centres, are the largest they have been since 2010 at 51,959.

As a result, the teacher workforce in 2018 is 447 higher than it was the previous year.

But EIS general secretary Larry Flanagan said: “We also have a large increase in the number of pupils in our schools which means that pupil-teacher ratios remain at an absolute standstill compared to last year.”

Scotland’s schools had 693,251  pupils in 2018, an increase of 4,611 from the 2017 total.

The pupil-teacher ratio in schools was unchanged from 2017 at 13.6 with the average primary school class size also remaining the same at 23.5 children.

Separate figures showed 70% of P7 pupils across Scotland in 2017-18 were meeting the expected standard in literacy, with 75% achieving this for numeracy.

In the most deprived parts of Scotland in 2017-18, just 59% of P7 pupils met the expected standards in literacy, compared to 83% in the most affluent communities.

Meanwhile, two-thirds (66%) of P7 pupils in the poorest areas achieved the expected standards for numeracy, 20 points lower than the 86% who did so in the least deprived areas.

“Pupils from the least deprived areas performed better than pupils from the most deprived areas at all stages,” the report noted.

While 85% of P1 children met the expected standards for numeracy, this fell to 76% for  P4  pupils and 75% for those in P7.

Three-quarters (75%) of P1 pupils were at the expected level in terms of literacy but this fell to 69% for P4 before increasing slightly to 70% for P7 youngsters.

In S3, 95% of students from the least deprived areas met the expected standards under Curriculum for Education for literacy, compared to 81% of youngsters from the most deprived areas.

The situation for numeracy was similar, with 96% of those from the least deprived areas reaching the expected standards, compared to 82% of those from the poorest areas.

Education Secretary John Swinney said he was “encouraged to see the attainment gap has also narrowed slightly”.

He said: “There is an increased proportion of primary pupils assessed as achieving the expected levels of Curriculum for Excellence by up to four percentage points.

“This coincides with the first year of our £120 million Pupil Equity Fund.

“While it is too early to draw direct conclusions from this data, I am encouraged to see the attainment gap has also narrowed slightly.”

He added: “Teacher levels are the highest this decade and the number of primary teachers is the highest since 1980.

“The average size of primary one classes has been dropping consistently in recent years, which is particularly important as helping children in the early years is crucial if we are to close the attainment gap between the most and least deprived.”

The figures also show 86.6% of school buildings were in a good or satisfactory condition in April  2018, up from 81.7% in April 2012.

“For the first time, more than 600,000 pupils are educated in schools classed as good or satisfactory condition,” Mr Swinney said.

Tory education spokeswoman Liz Smith said: “Notwithstanding a very welcome rise in teacher numbers, there remain some grim statistics which will make worrying reading for parents and teachers right across Scotland.

“The fact that one in three pupils is leaving primary school without reaching basic standards in literacy is the main worry.

“These literacy figures aren’t just bad news for the prospects of youngsters, but bad for the future economy too.”

Labour’s Iain Gray was also critical over the “utter failure of the SNP government to tackle attainment”.

He said: “This is a consequence of 3,000 fewer teachers under the SNP and £400 million slashed from schools since 2010.

“SNP ministers claim that education is the top priority – these figures show that the poorest young people are being failed badly.”

While the SNP pledged children in the first three years of primary would be taught in classes of 18 students  or less, Liberal Democrat education spokesman Tavish Scott said this was being achieved for just 12% of youngsters

“These figures show that the SNP Government deserves an F for the delivery of its flagship class size policies,” said.

“It is symbolic of their failures in education. This won’t be turned around so long as teachers receive a rotten deal. “