A High Court judge has granted permission for a judicial review of how Pembrokeshire council sets the amount it pays in care home fees.
A hearing in Cardiff heard that the weekly £390 it pays per resident is not enough to cover costs.
The owners of four homes claim they face closure without more money and that the fees structure is unfair.
The council's legal defence claims the homes' financial problems are not a consequence of how the fees are set.
At the hearing, the homes - which are trying claim extra payments of £90 per resident per week - were refused a temporary increase in fees until the judicial review.
The council said it paid a similar level to many in Wales and that the homes' financial problems stemmed from their agreement with the bank.
South Pembrokeshire MP Simon Hart said he hoped the "test case" would provide a solution for the 86 residents affected.
The care homes involved are Pen-coed in Saundersfoot, Langton Hall in Fishguard, Woodfield Care Home in Narberth and Woodland Lodge in Tenby.
Care Forum Wales, which represents independent care providers, was due to provide written evidence on their behalf.
Senior policy advisor Barry Latham said: "These cases appear to be symptomatic of a wider problem in the social care sector which is causing a postcode lottery in relation to the provision of care in Wales.
"As around 75% of residents in care homes are publicly funded, the fees which local authorities pay for their supported residents have a critical impact on the financial viability of care homes."
Conservative MP Mr Hart said: "This is going to be an extremely interesting case and I'm sure that a lot of people will be watching the outcome closely.
"I sincerely hope that a solution will be found and that the residents from the four homes affected will be able to stay put.
"I am particularly worried about those who live at Woodfield as I understand it is one of only five nursing homes in the county that can take Elderly Mentally Ill (EMI) residents and so they are particularly vulnerable."
In a statement issued after the hearing, a council spokesman said: "The council is pleased that his Honour Judge Jarman QC refused the claimants' applications for injunctions and said that although he was satisfied that they had a realistic case, he did not consider it to be a strong one.
"The case will now proceed to a final hearing on 14 December this year at which we believe the council's position will be fully vindicated.
"In the meantime the county council will continue discussions with the care home owners because the issue needs to be resolved."