Almost 8,000 hospital operations were cancelled last year due to factors including a lack of beds, staff and equipment.

New figures show that in December, 644 (2.4%) of operations were cancelled by the hospital due to capacity or non-clinical reasons.

These can include the unavailability of beds, staff and equipment as well as employee illness, dirty equipment and theatre sessions overrunning.

The December figure takes the 2016 total to 7,740 - a number seized on by opposition parties.

Scottish Labour health spokesman Anas Sarwar MSP said: "Every single day NHS staff tell us that they are under pressure and under-resourced. Now we see that close to 8,000 planned operations were cancelled last year because hospitals did not have the capacity to cope.

"A decade of SNP mismanagement of our NHS means that patients are being let down because hospitals are not getting the support they need."

Alex Cole-Hamilton MSP, for the Scottish Liberal Democrats, said: "Across the country more than 20 patients a day failed to receive the operation they needed because their hospital could not accommodate them. This is bad for patients, bad for their families and a huge burden on NHS staff too.

"I was deeply troubled when Dr Patrick Statham, a neurosurgeon at the Western General Hospital, got in touch to say the situation in his ward was so dire he was being forced to cancel operations because of a lack of beds.

"Doctors and nurses across the country are working incredibly hard to give patients the best possible care. Now the SNP need to match that dedication and get serious about giving health boards the support they need."

Health Secretary Shona Robison said: "Decisions to cancel planned operations are never taken lightly and we are working with health boards to make sure we manage capacity and planning in order to keep all cancellations to a minimum. We have made it clear to boards that patients with the greatest clinical need, such as cancer patients, should not have their operations cancelled.

"Of the 27,153 planned operations scheduled for December, 644 operations (or 2.4%) were postponed for non-clinical or capacity reasons. The highest rates of cancellations continue to be for clinical reasons or those cancelled by the patient. On average there are 900 operations per day and over 320,000 carried out in the last year.

"Since we started publishing this data from May 2015, we have seen the number of cancelled operations remain relatively stable, with understandable fluctuation over the winter months when additional demands are put on our health service.

"Health boards continue to work to ensure disruption to patients is always kept to an absolute minimum, and any postponed procedures will be rescheduled at the earliest opportunity."