Image copyright Getty Images

More than 2,500 hospital beds a day are taken up by patients whose release has been delayed due to problems in the social care system.

Analysis of official so-called "bed-blocking" statistics reveals the areas where the NHS is worst affected.

The Local Government Association said under-funded authorities had placed care providers under "huge pressure".

The government said the difference "of over 20 times between best and worst councils is unacceptable".

Although the NHS is responsible for most delayed transfers, the number attributable to social care has been increasing as well.

Out of 1.87 million delayed days between April 2016 and the end of January 2017, just over 1 million were down to the NHS. There were 635,000 where social care was responsible and 145,000 that were a mixture of both.

Delayed transfers occur when a patient is deemed medically well enough to be released from hospital, but something else holds up their discharge.

The BBC England data unit looked at delays caused by social care pressures. This could be delays in getting a home care package or nursing home placement.

On average, there are 12 days lost per 1,000 people aged 18 and over across 151 areas.

There are wide variations across the country. Cumbria County Council had the highest rate of delays in England, with 78 days per 1,000 people.

Delays due entirely to social care have more than doubled in the past five years.

Get the data here

The government's view

In January, Prime Minister Theresa May told the BBC's Andrew Marr Show there were "pressures" on social care and that councils would be allowed to increase the council tax to help relieve it.

She said: "We need to ensure that best practice is spread around the country. There are some councils where there are virtually no delayed discharges from hospitals into social care, there are others, there are 24 councils, that account for 50% of the delayed discharges."

An independent charity, The Health Foundation, said this "does not tell the whole story" as most of those councils also happen to be areas with larger populations.

In his first Budget, Chancellor Philip Hammond said there would be an additional £2bn for social care services in England over the next three years, allowing councils to "act now to commission new care packages".

The extra £2 billion: Who gets what?

Extra social care funding £2 billion additional funding by 2020 £244.58 per person aged 65 and over

152 councils to share it Getty Images

The government said it recognised "all local authorities face pressure on the provision of adult social care". In addition to allowing them to raise additional funds through council tax rises, a further £2bn is being allocated to them over the next three years.

Broken down by population, the "improved Better Care Fund" works out as an average of £245 per adult aged 65 and over. The money is not distributed solely on population size or even by the size of the population aged 65 and over. Instead, it is based on "relative need".

That means areas such as Tower Hamlets getting the equivalent of £751 per adult aged 65 and over, while other areas such as Wokingham would get as little as £12 per person in the same age range.

'Managers ask how long patient will live'

What will it take to unblock 'bed blocking'?

See how your area compares on this interactive map .

For more stories from the BBC England Data Unit visit our Pinterest board

Hospitals will only discharge frail patients if they know there are care packages in place in the community.

In January, an A&E nurse told 5 Live Investigates how managers would ask about the likelihood of patients dying because of a shortage of space.

"I really struggle when management ask how many hours do I think that patient's going to be alive for because we need the bed," she said.

Councillor Izzi Seccombe, chairman of the Local Government Association's Community Wellbeing Board, said: "No one's elderly parent, grandparents or friends should be left unnecessarily in a hospital bed, when they could be treated in the comfort and dignity of their own home.

"Councils are absolutely committed to reducing the level of delayed transfers of care from the NHS and are working with providers and hospitals to help reduce pressures on the NHS.

"But the scale of underfunding councils have faced in recent years is placing the care provider market under huge pressure, making it more difficult to discharge people from hospital back to their homes and communities."

She called for councils to be given "full flexibility" over additional funding for social care.

Image copyright Tableau Public Image caption Map shows how areas compare for hospital delayed transfers where social care was an issue

Anita Charlesworth, director of research and economics at the Health Foundation, said regional differences, including demographics and affluence, mean that some areas will be more affected than others.

"Less affluent areas may experience more strain on social care services, as more people are unable to fund their own care. The new powers to raise council tax will not redress this because they will raise the most money in the most affluent parts of the country."

Nigel Edwards, chief executive of health charity The Nuffield Trust, said the main issue was money but some areas "could do more to make their processes work better".

A Department of Health spokeswoman said: "Patients should never be stuck in hospital unnecessarily and we are determined to make health and social care more integrated.

"There is a difference in delayed transfers of over 20 times between best and worst councils - this is unacceptable. We are working closely with NHS and local authorities to reduce this variation and will bring forward proposals later this year to ensure a more financially sustainable social care system."

A spokesman for Cumbria County Council said delayed transfers were "a symptom of complex pressures across the system, and do not have one simple cause or solution".

"In Cumbria the problems are particularly acute because of the very high, and increasing, proportion of older people in the county and the pressure that places on health and care services," he said.

A spokeswoman for Trafford Council, which had 53 delayed days per 1,000 adults, said it accepted the number was "higher than it would like them to be" but added that a growing older population, "living longer but in poor health" was a national issue.