The number of patients kept in hospital after being told they were clinically well enough to leave has dropped by more than 10% in a month.

A census carried out in hospitals in December found 1,333 people were affected, down from 1,509 the previous month, a fall of 11%.

The most common length of delay was between three days and two weeks while 23 people had been waiting for a year or more.

The problem of bed-blocking - also known as delayed discharge - happens when patients are clinically ready to leave hospital but are waiting for the necessary care and accommodation arrangements to be put in place.

A total of 45,067 days were taken up by bed-blocking in December, the ISD Scotland figures show, down from 45,639 in November - a 1% drop.

In the December survey, most people affected (69%) were aged 75 and over.

The majority of delays were due to health and social care reasons, such as waiting for care home places or for social care support.

Labour health spokesman Anas Sarwar accused the Scottish Government of "total mismanagement" of the NHS.

He said: "Health Secretary Shona Robison promised to eradicate delayed discharge by the start of 2016.

"Instead, the problem has become so bad that delayed discharge across Scotland could have filled every single bed in three Scottish hospitals every day of the year, or every single patient room in our flagship hospital.

"That gives you an idea on the scale of capacity that delayed discharge takes up in our health service. Eradicating it from the system would free up huge resources in our NHS.

"But a decade of short-term thinking and total mismanagement of our NHS has resulted in patients being trapped in hospitals when they don't need to be there."

Ms Robison said: "While these figures show delayed discharges at the lowest level since June 2016, we need to build on the good work already being done and which has led to a year-on-year reduction of 7% compared to the NHS in England, which is seeing a 27% rise in the number of bed days lost.

"We have integrated health and social care to ensure patients are at the heart of care decisions and receive more treatment in their communities, reducing demand for acute hospital usage by reducing avoidable admissions, lengths of stay and delayed discharges.

"I remain determined to eradicate this problem and to do this we've allocated an additional £107 million for health and social care integration, bringing social care to funding to around £500 million a year, with £30 million of this specifically to tackle delayed discharges."