Up to 50 operations a week are being cancelled at Wales' largest hospital because of "bed blocking".
Hundreds of patients fit to be discharged are in hospital beds
On average, eight operations a day are being cancelled at Cardiff's University Hospital of Wales, BBC Wales' Week In Week Out programme has revealed.
Some of the patients are in hospital waiting for a bed to become available in a care home.
Welsh Health Minister Brian Gibbons said he was discussing the situation with health chiefs and councils.
The programme's investigation found that a range of planned surgery including heart, liver and cancer operations were being affected by delayed discharges or "bed blocking".
About 650 patients across Wales who are medically fit to be discharged are currently occupying hospital beds, with 190 of them within Cardiff and Vale NHS Trust.
Many need to move into care homes, but remain in hospital because of disputes over who should fund their care.
Others remain in hospital until a bed becomes available in a home of their choice.
David Scott-Coombes, clinical director of general surgery at the University Hospital of Wales, said the knock-on effect of bed blocking was being felt throughout the hospital.
"It has a dire effect on our ability to undertake surgery," he said.
"Just this Sunday, 13 patients were not admitted because there was no available bed.
Up to 50 operations a week are being cancelled at UHW
"We are under pressure to reduce our elective waiting time from 12 months to eight months."
He added there were fears that those targets would not be achieved.
Ian Morris, the trust's general manager for surgery services, said bed blocking was also affecting the accident and emergency unit, where the main reason for delays in the unavailability of beds elsewhere in the hospital.
He said: "The current position has deteriorated in last few months.
"We have at the moment 18 people per night on average who are who are awaiting a bed in the emergency unit each morning when we come through."
Clinical director of critical care Mark Smithies, added: "It's simply a question of the numbers - the numbers coming in are rather larger than the numbers going out."
The Welsh Local Government Association, speaking for Wales' local authorities, said councils were trying to meet ever-increasing demand.
A "small number" of operations were cancelled on Monday at the Royal Glamorgan Hospital near Llantrisant because of an influx of patients with chest infections over the weekend.
The hospital had to open extra wards to cope, which had a knock on effect on routine surgery.
Pontypridd and Rhondda Trust said no waiting list targets would be broken.
Week In Week Out is broadcast at 2235 BST on BBC One Wales on Tuesday, 10 October.