Health Secretary Neil Gray said more than £220m had been invested to improve patient flow, enhance capacity and remove blockages keeping patients in hospital longer than necessary.

“More must be done to ensure people receive the care they need in the right place, at the right time,” he added.

He said a body involving both the Scottish government and local government would consider the report’s recommendations.

Dr Fiona Hunter, president of the Royal College of Emergency Medicine for Scotland, said delayed discharge resulted in “an almost inconceivable amount of wasted resources”.

Scottish Labour’s health spokesperson Jackie Baillie said the SNP had promised to end delayed discharge, but that things were worse than ever before.

“This issue is causing misery for patients, piling pressure onto hospitals, and costing our NHS billions,” she said.

Scottish Conservative health spokesman Dr Sandesh Gulhane said: “This report lays bare the ongoing damage caused by the SNP’s broken promise to eradicate delayed discharge over a decade ago.”

Scottish Liberal Democrat leader Alex Cole-Hamilton said it was “utterly astonishing” that the NHS was losing £1.2m a day to delayed discharge.