A spike in winter-related illnesses in the U.K. is pushing its hospitals over the edge.

Patients are dying prematurely in hallways while they wait for beds, say senior emergency room doctors.

And NHS Providers -- a trade association for health care workers -- says the National Health Service (NHS) can't cope. It said this week that 2017 was the first year that critical targets related to emergency room care, cancer and planned surgery had all been missed.

Health care experts say it all comes down to money and a shortage of staff: The country is not allocating enough cash to pay for the care required for a growing and aging population.

The "potent cocktail of rising demands outstripping available funding and staff [are] the key issues," said Siva Anandaciva, the chief policy analyst at British health think tank, The King's Fund.

"The NHS is in the middle of the longest funding squeeze in its history," he said. "Historically funding for the NHS has risen by approximately 4% each year -- above inflation -- but since the global recession this has slowed to only 1% growth."

The slower growth in expenditure is part of the government's austerity drive since 2010. Overall government spending slumped from 45% of the country's GDP in 2010 to just over 39% in 2017.

Data from the Organisation for Economic Co-operation and Development shows that the U.K. is one of the lowest health care spenders in the G7, behind the U.S., Germany, France, Japan and Canada.

Spending on health care by government and citizens amounted to less than 10% of GDP in 2017. The U.S. spends 17.2%.

It's a long-standing complaint that health care services across developed nations are always short on cash. And that they don't always make the most of the resources they have.

But Anandaciva says the crisis facing British hospitals is not about inefficient use of financing and resources.

"Before the recession, when the NHS was given an unprecedented boost in funding, we saw the benefits of this in significant reductions in waiting times for planned and emergency care, indicating it is not the NHS model that is fundamentally the issue, it's that the NHS is underfunded and understaffed to deliver all that is required of it," he said.

The government responded this week to concerns raised by health care workers, claiming that the NHS was "ranked as the best and safest healthcare system in the world" and that it was providing more money.

"The NHS was given top priority in the recent budget with an extra £2.8 billion allocated over the next two years," the Department of Health said in a statement.

It also pointed to a recent decision to increase the number of trainee doctors by 25%.

But even as new training places open up, the U.K.'s population has become too much for the system to handle. The latest official statistics show that 18% of the population is now 65 and over, up from 16% in the previous decade. Older patients require more care, resources and attention.

Immigration means the population of the U.K. is growing too -- it now stands at a record 65.6 million.

Meanwhile, thousands of NHS jobs are going unfilled.

Related: How U.S. health care stacks up against global systems

Concerns about immigration spurred many Brits to vote to leave the European Union. But Brexit could have unintended consequences, as the NHS relies on health care workers from the EU.

A parliamentary report shows 10% of hospital doctors and nearly 6% of all NHS staff in the U.K. are from the EU.

And while the percentage of EU health care staff hasn't changed much since the Brexit referendum, the NHS is finding it harder to recruit people from the EU.

"This change was particularly pronounced for the nurses," the report's authors said.