The number of patients being kept in hospital who are well enough to leave has risen slightly, new figures have shown.
Official statistics from a census carried out in hospitals in June found 1,300 people had to stay in hospital due to delayed discharge, also known as bed-blocking.
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.
The June figure is up from 1,286 in May, but is lower than the 1,377 in April.
Figures from ISD Scotland showed that of the patients delayed in June, 1,057 faced waits of more than three days.
The majority of those waiting more than three days, 727, were through health and social care reasons, while 292 had complex needs and 38 faced waits due to patient and family-related reasons.
A total of 39,252 days of hospital stays in June were caused by delayed discharge, equivalent to a daily average of 1,308 beds, up from the average in May of 1,279.
Health Secretary Shona Robison said: "I'm clear that no-one should wait longer than absolutely necessary to leave hospital and that's why we have legislated to integrate health and social care to ensure services are planned and commissioned in a joined-up way from a single budget.
"We are continuing to make progress and the number of bed days lost to all delays are 11% lower than January this year.
"The number of people delayed over three days due to delays in health and social care also fell by 14% between January and June of this year.
"The recently announced extra £9 million to improve patient flow through hospitals this year will help us continue to reduce delays even further and we are investing further in social care to eradicate this issue.
"This year, almost half a billion pounds of additional investment will go into social care and integration while the health revenue budget will increase by almost £2 billion by 2021."
Copyright (c) Press Association Ltd. 2017, All Rights Reserved. Picture (c) PA Wire.