Health Minister Brian Gibbons has blamed Cardiff council for long waits at the University Hospital of Wales' accident and emergency unit.
Dr Brian Gibbons said the council must find beds in care homes
Dr Gibbons said it was down to the local authority to solve the issue of "bed-blocking" in hospitals.
Trust managers said tackling the issue was "our number one priority".
Cardiff council said private nursing home sales had created a shortage but it would take a year to provide 200 extra care home beds.
Around 180 beds are currently blocked in Cardiff hospitals by patients who do not need hospital care but cannot leave the wards because there is no place available in a care home.
Dr Gibbons told BBC Wales: "He said: "I think there is a particular problem in Cardiff in that they haven't got a lot of care home beds, so there is a unique problem in Cardiff which does need to be addressed."
He said the local authority was working to address this issue but said it also needed to look at promoting the independence of older and vulnerable people as well as people's ability to live in their own homes.
All sides accept there is a shortage of care home beds in Cardiff
He said the assembly had given money for the council to redesign social care services as well as for joint working with other relevant organisations.
He said: "From our point of view a fair amount of money has gone into assisting all local authorities. Other local authorities have demonstrated that progress can be made."
Councillor John Dixon, who is responsible for social services in Cardiff, said: "There is a problem in Cardiff and Brian Gibbons is quite right, it's down to one of basic economics.
"In Cardiff you have increasing property prices so care home owners are increasingly looking to sell up as a way of realising more of their assets."
He said the local authority had added £1.2m to the money it had received from the assembly for care homes services.
But 200 extra care home beds and extra care housing would not be available in the city for another year, he said.
"It's not something that can be solved overnight. We are doing as much as we can right now but it is going to cost money."
He said the Welsh assembly and UK governments had spent money on improving bed capacity but attention was also needed in the social care sector.
"It's no good building capacity within a hospital unless you are also looking equally at the back door of getting people out of there and into appropriate care."
In a statement Cardiff and Vale NHS Trust said: "We regret any distress caused by delays in our emergency unit.
"Tackling delayed transfers of care is our number one priority, and 85 % of patients attending the unit are treated, and either discharged or admitted within four hours."