First Minister Nicola Sturgeon has insisted that progress is being made in tackling bed-blocking in Scotland's hospitals despite Labour saying the problem has trebled under her watch.

The SNP leader came under fire from Kezia Dugdale, who said last year people had remained in hospital for 612,000 days when they were well enough to go home, because of a lack of care services.

She told MSPs at Holyrood that Ms Sturgeon had told the SNP conference in 2011 that patients had spent 200,000 days in a hospital bed when they did not need to.

"At that time, the First Minister rightly said that was too many," Ms Dugdale said.

The Scottish Labour leader went on: "In the last year, patients in Scotland spent more than 612,000 days in a hospital bed when they were fit to go home.

"That means it has more than trebled under the SNP government since this First Minister admitted there was something badly wrong. So, by any measure that is unacceptable."

She added: "That is thousands of patients, the majority of whom are elderly, ready to go back home or into the community but can't because the extra support they need just isn't there."

Ms Sturgeon said the problem of bed blocking - also known as delayed discharges - was "hugely important" and had been the focus of Scottish Government efforts.

She stated: "Since 2007 there's been a 52% reduction in delays over four weeks, a 55% reduction in delays over six weeks, the number of delays over three days is down by 50%.

"Having delivered the target of zero delays over six weeks, we've progressively toughened that target and we're now focusing on ensuring patients are discharged within 72 hours.

"As long as one patient is delayed in hospital longer than they should be, then we've got work to do, that is wrong for that patient and it is not doing a service to our National Health Service."

She added that with 10,000 fewer bed days lost in July 2015 than in December last year, "any reasonable person" looking at the figures would "say that we are making considerable progress".

The two party leaders clashed on the issue in sometimes noisy exchanges at First Minister's Questions at Holyrood.

Ms Dugdale said she did "not doubt for a minute the First Minister's sincerity" over the issue as she told MSPs that Health Secretary Shona Robison had said in February she wanted to "completely eradicate" the problem.

The Labour leader added: "It was in deepest winter when Shona Robison pledged to abolish delayed discharge.

"Patients in Scotland spent 46,873 days in a hospital bed when they didn't need to be there, and according to figures published this week that has actually increased to 47,797 at the peak of summer.

"Patients are rightly concerned about what will happen this winter. It's another target set by SNP ministers that they have failed to meet.

"Time and time again we see the SNP government introduce lots of targets with great fanfare but then they run for cover when they fail to deliver on them."

Ms Sturgeon stressed tackling delayed discharges "is one of the key things we can do to reduce pressure on our acute hospitals".

She added: "That's why I think it is something to be welcomed that the number of bed days lost in July, we saw this in statistics earlier this week, was down by nearly 10,000 since December last year.

"Just to put that into context, that is the equivalent of every single acute medical bed in NHS Highland for an entire month.

"So yes, there is still work to do, but real progress being made."

She insisted the number of people being kept in hospital when they no longer needed medical care was falling, saying in August this year there were 731 patients delayed over three days and 481 who were held up by more than two weeks.

She added: "Not just that, the average length of delay in July 2007 was 52 days. That, by August 2015, had halved to 23 days.

"So, yes, there is more work to be done to eliminate delayed discharges as we have committed to doing, but any reasonable, objective person looking at these figures would know there has been significant progress made."