PATIENTS were more likely to be treated in hospital within 12 weeks before the SNP introduced a legally-binding guarantee than after it, according to new figures.

Confronting Nicola Sturgeon with the data at First Minister’s Question, Scottish Labour leader Kezia Dugdale said it typified the SNP’s “10-year dismal record” of running the NHS.

Under the Patient Rights (Scotland) Act, patients have, in theory, been guaranteed treatment within 12 weeks for inpatients and day cases since October 2012.

However the numbers waiting longer have steadily increased.

In the first quarter of 2012, before the guarantee came into effect, around 3,500 waited longer than 12 weeks, but in the first quarter of 2017 it was 13,231, despite fewer patients overall being treated.

Last year more than 38,200 people waited over 12 weeks.

As the opposition focused on the SNP’s record ahead of the election, Ms Dugdale said the figures should “shame the First Minister”.

She said: "Behind these numbers are people and real lives. It's pensioners, it's children and parents waiting for months for operations.

"This isn't the only problem facing the NHS, this week alone we've seen A&E targets missed again, cancer diagnostic waiting times missed again.

"Isn't that what happens when the SNP spends more time running a campaign for a referendum than it does running our NHS?"

Ms Sturgeon said: "I acknowledge the challenges facing our NHS, the same challenges facing health services across the world, increasing demand because of the changing demographics.”

But she added performance indicators for NHS Scotland outstripped those in other parts of the UK, particularly “Labour-run Wales”.

She said: "We will continue to focus on delivering for people across the country and leave the opposition to their constitutional obsessions."

Scottish LibDem leader Willie Rennie said: "The waiting time guarantee is not worth the paper that it is written on."

Scottish Tory leader Ruth Davidson cited a “litany of tweets” by Glasgow SNP MSP John Mason to claim the Nationalists were not doing enough on declining school standards.

Mr Mason recently wrote: "When I was at school there was too much emphasis on academic. Of course reading and writing are very important. But if someone is a good surgeon and cannot spell, is that a problem?"

He also said “many people do not need fabulous literacy to do their jobs well" and children learning times tables and spelling by rote was an “old fashioned view”.

Ms Davidson asked: “Is this the view of the SNP Government, because if it is it explains why standards are so poor?"

The First Minister said the highest standards of literacy were “vital” for young people.

Ms Davidson also attacked the SNP government for its admission that it cut teacher training too sharply in 2011, leading to supply problems now.

She said: "The line on education from this First Minister seems to be, Forget 10 years of failure, forget about the mess they've made, forget about the children who have been failed by her Government. She is the person to sort this out."

Ms Sturgeon said: “It's not going to help anybody raise standards in our schools if we've got a Westminster government pushing those children into conditions of poverty."

In response to a question from Labour MSP Pauline McNeill about the use of cannabis to help arthritis sufferers, Ms Sturgeon said she was “sympathetic” to the drug’s use to alleviate pain.

She said: “I have long been of the view that there is a case for medical use of cannabis. I am not in favour of the decriminalisation or legalisation of cannabis generally, but carefully used for certain conditions, I think there is a case to be made.”