More than 400 people had to wait longer than the target time of two weeks to be discharged from hospital after they were well enough to go home, new figures have revealed.

Official NHS statistics showed there were 408 patients who had a standard delay of more than two weeks in May.

The total is up 14% from the previous month and the latest figures also revealed that in May 165 people had been waiting more than six weeks to be discharged.

Delayed discharges - also known as bed blocking - happen when patients are clinically ready to leave hospital but their necessary care, support and accommodation arrangements are not yet in place.

In April a new target came into force, stating that nobody should have to wait more than two weeks to to be discharged.

Of the 408 patients who waited longer than the two-week target time, 41% were waiting for a place to become available at a care home while 38% were waiting for care and support to be put in place to allow them to return to their own home.

Health Secretary Shona Robison, who has made tackling bed blocking a top priority, stressed progress is being made.

In May there were 633 patients who were delayed for more than three days, down from 947 in October 2014.

But she said: "Clearly, there are still too many people delayed in hospital as they wait for a care package in the community or a care assessment to allow them to leave hospital.

"This is why I'm calling on partnerships to renew their focus on tackling delayed discharge.

"The Scottish Government has already committed £100 million over three years to support local efforts by partnerships and help to discharge patients more quickly.

"In addition, and as an indication of our commitment to this issue, we are beginning to publish delayed discharge statistics monthly - bringing greater transparency to this important issue."

Ms Robison added: "Tackling delayed discharge is one of this Government's key priorities.

"Ensuring people are able to get home or to a care setting as soon as they are judged clinically fit for discharge not only has proven benefits for the patient but helps to free up beds and improve the flow of patients through the hospital.

"Our focus has been on reducing overall delays to ease pressure on the acute system and we invested £18 million over the winter to support this.

"In addition, local authorities and the NHS have made a commitment to work towards discharging more patients within 72 hours of being ready to leave hospital.

"It is welcome, therefore, that the figures published today show less people are waiting over three days to be discharged.

"Partnerships have made considerable progress this year, with over two-thirds of local authorities now having either no delays over two weeks or with numbers in single figures. The total number of delays is half what it was 10 years ago."