The Scottish Government has been accused of "empty self-praise" of its own record on education.

Labour, the Conservatives and the Liberal Democrats lined up to attack the SNP administration, arguing it had failed to do enough to tackle the attainment gap, during a debate at Holyrood.

Education Secretary Angela Constance said there had been "real progress" in education despite the fiscal challenges of the last eight years, but she admitted more needs to be done.

But she was accused of "egregious back-patting" and a "misplaced self-congratulatory tone" by her opponents.

Ms Constance said the Government had stepped up work to improve literacy and numeracy skills, increased the entitlement to free early learning and childcare, and was taking action to raise attainment in schools.

Its £100 million attainment fund is helping over 300 schools, she said, while attainment advisers are to be appointed in every local authority by the end of November.

Meanwhile, the Government will move ahead with new national, standardised assessments for pupils in primaries 1, 4 and 7, and in S3 as part of a National Performance Framework.

"We must build on success to ensure that every child and young person regardless of their background receives an education that gives them the skills they need to thrive rather than simply survive in life.

"We want an education system focussed on attainment and achievement built around delivering equity and excellence and crucially aspiration and ambition.

"Improving educational attainment for all children and tackling inequality are at the heart of this Government's agenda."

Labour's Iain Gray accused the Government of "self-praise", with the most "egregious piece of empty back-patting" reserved for its comments on class sizes.

Ms Constance's motion to Parliament cites a 97% drop in P1 pupils in classes of 26 or more, but legislation previously capped classes at 25.

"This is not a success, it is a failure, because the solemn election promise from the SNP was class sizes of 18 in P1, 2 and 3," Mr Gray said.

"The truth is that class sizes have gone up under this Government, and no wonder, because there are 4,200 fewer teachers in our schools and a recruitment shortage to boot."

In addition, he said, the Government's own literacy and numeracy survey shows standards are falling, Higher pass rates have fallen and there are fewer college places.

The Government had made a "mess" of Curriculum for Excellence, and is "making heavy going" of the attainment challenge, Mr Gray said.

"We support the cutting of the attainment gap and the National Improvement Framework," he added.

"For that reason and that reason alone we will hold our nose at the empty self-praise of the Government motion tonight and support it, but this is an incompetent mess and the Cabinet Secretary needs to get a grip of it."

Conservative MSP Mary Scanlon also attacked the Education Secretary over the decline in attainment in the most recent Scottish survey of literacy and numeracy.

"Children are being left behind just now," she said.

"We hope that the Government will work with teachers, work with schools, learn from good practice and ensure that pupils' needs are at the centre of their proposals.

"The nationalist members who are very vocal on the front bench today, I hope they will understand why the opposition parties aren't exactly overwhelmed with joy at your record."

She also criticised cuts to the college sector, adding: "The nationalist Government shows a distinct lack of understanding for those who deserve a second chance after their school experience."

Liberal Democrat Liam McArthur MSP said Government action to tackle the attainment gap is "inadequate" and in some cases "actually exacerbating the problems".

He said: "The minister's motion asks us to celebrate the Government's successes yet with 4,000 fewer teachers than in 2007 and a class size commitment for P1 to 3 which has never been close to being honoured, this self congratulatory tone seems at best misplaced.

"If we are serious about building on success, addressing weakness that exists and making genuine headway at last in closing the attainment gap, we need to be honest and ambitious about what needs to be done."