More than 53,000 patients have been forced to wait longer than 12 weeks for treatment on the NHS in Scotland.

The Scottish Government introduced a treatment time guarantee in 2012 which mandates that patients have a right to be treated within three months.

Nicola Sturgeon confirmed the guarantee has been broken in 53,257 cases since the the Charter of Patient Rights and Responsibilities came into effect.

The revelation came during First Minister's Questions on Thursday when Scottish Labour leader Kezia Dugdale grilled Sturgeon on NHS waiting times under her government.

Dugdale told the Scottish Parliament: "Since 2012, 53,257 patients waited longer than 12 weeks for treatment. In fact, the last few months have been the worst on record.

"And these aren't just statistics. It's pensioners in need of a knee replacement having to wait for months and people waiting for eye surgery, facing delay after delay.

"How bad do things have to get before she steps in to fix this mess?"

The Labour leader suggested the NHS had taken second place to a another independence referendum in the First Minister's priorities.

She continued: "While Labour Party activists were out campaigning on the NHS with staff and patients, the SNP was out talking about independence.

"It's no surprise the Nationalists don't want to campaign on the NHS. Because here's the SNP's record - local services facing closure, missed targets, and a growing workforce crisis.

"Under the SNP the NHS is stuck in the waiting room while Nicola Sturgeon plots a second referendum."

The treatment time guarantee, which took effect in October 2012, reads: "You have the right to start to receive an agreed inpatient or day case treatment... within 12 weeks of agreeing to it. This is called the treatment time guarantee."

The First Minister hit back, telling the chamber waiting times were down overall and outcomes had improved on Labour's period in government a decade ago.

She said: "Since the legal right was introduced in 2012, there have been 53,257 who have waited longer than 12 weeks but there have been 1,267,000 treated within 12 weeks.

"Waiting times are lower than they were when we took office but we have work to do because of rising demand in our health service.

"We are continuing to ensure that our health service has the investment and record numbers of staff so that we can continue to provide the best care and treatment for patients across the country."

Sturgeon added: "Kezia Dugdale talked about records when it comes to waiting times. It is worth pointing out that when this government took office, only 85% of patients were being treated within 18 weeks.

"Not only have we reduced waiting times from 18 weeks to 12 weeks, a higher percentage of patients are now being seen within that shorter waiting time. That is the progress that we are making."