Almost half of patients who faced a long delay to leave hospital last month were waiting for a place in a care home, new figures show.

Of the 481 people delayed for more than two weeks in August, 212 (44%) were waiting for an available care home place, with 176 (37%) waiting to go home.

Alison Johnstone, Green MSP and health spokeswoman, called for urgent action on care home places and care-at-home packages.

She said: "Behind these figures are distressing and frustrating situations particularly affecting older people and their families.

"We need to see the Scottish Government, NHS boards and local authorities picking up the pace to provide more care packages.

"And we need to do more to prepare and support people as they move from hospital to social care, to ensure their health doesn't suffer a setback."

The figures show the number of hospital bed days associated with delays in discharge rose 5% from 45,356 in June to 47,797 in July.

Seven out of 10 delayed discharge bed days related to patients aged 75 or over.

Liberal Democrat health spokesman Jim Hume MSP accused the SNP administration of "letting down" older people.

He said: "The number of people being kept in hospital despite being judged clinically ready for discharge has increased. 195 patients faced waits of more than six weeks in July, compared to 139 in April.

"It isn't fair on older people or their families to keep them in hospital even a second longer than necessary. Scottish Liberal Democrats believe patients should have the flexibility to be treated in their own settings wherever possible.

"It's becoming increasingly clear that the SNP is failing to back this sentiment with hard support."

Health Secretary Shona Robison said tackling delayed discharge remains a key priority for the Government, with £100 million of investment announced in January.

She said: "Significant progress has been made since then, with the number of bed days occupied by a delayed discharge patient falling by nearly 10,000 between December last year and July this year.

"Month-on-month comparisons also show that delayed discharge levels are much lower than this time last year.

"I am clear that more still needs to be done to reduce delayed discharge rates even further and I urge local partnerships to work together to redouble their efforts to reduce delayed discharge - particularly as we head towards winter."

She said the Government is working closely with health boards and local authorities with high rates of delayed discharge, such as Lothian, Fife and Grampian.