First Minister Humza Yousaf has backed a council's condemnation of proposals to house asylum seekers on a ship.
Edinburgh City Council leader Cammy Day has written to the Home Office to voice his concerns that the ship could become a "floating prison".
The MS Victoria is currently docked at Leith and it has housed more than 1,000 Ukrainian refugees, with the final cohort set to leave by July 11.
Labour councillor Mr Day said the council was contacted by the UK Government over its intention to commission the ship to house asylum seekers.
He said that decision is "all the more surprising" given previous advice from the UK Government that it would be impossible for the ship to remain.
The Home Office said the decision was taken due to the "incredible strain" on the asylum system.
Mr Day said council leaders were not consulted on the plan, and the local authority has urged UK ministers to provide further details.
He said: "The potential consequences for the council in terms of the pressures on our services - and the city as a whole - are severe and barring robust partnership discussions involving NHS, police and other colleagues we will continue to oppose these plans in the strongest terms.
"Many of these people have risked their lives to make it to Europe and what they need is recognition and rights, not an unknown future without the support they desperately need.
"While the MS Victoria has been a place of refuge for many Ukrainian families arriving in Edinburgh, until we have adequate assurances from the UK Government regarding the welfare and ongoing engagement and support, we cannot allow it to become a floating prison for asylum seekers."
Speaking at the Royal Highland Show in Edinburgh on Friday, Mr Yousaf said: "I have to say I side very strongly with Edinburgh City Council, who have articulated very strong opposition to that plan.
"I can understand why. There is quite a difference between the rights asylum seekers have and refugees have.
"The asylum-seeking population does not have the right to work, don't have recourse to public funds - very different to the refugee population - so I can understand where the concerns are from Edinburgh City Council.
"Ultimately, it's a discussion between the Home Office and Edinburgh City Council but I have to say I side very strongly with Edinburgh City Council on this matter."
A Home Office spokesperson said: "The Home Office has a statutory obligation to provide accommodation for asylum seekers who would otherwise be destitute while we consider their claim.
"The significant increase in illegal, unnecessary and dangerous Channel crossings has put our asylum system under incredible strain and made it necessary to continue to use hotels to accommodate some asylum seekers.
"We are committed to making every effort to reduce hotel use and continue to engage with local authorities as early as possible whenever sites are used for asylum accommodation."
The British Red Cross have also expressed concern, saying a "docked ship with windowless cabins is not an appropriate place to house people who have been forced to flee their homes and experienced trauma".
Register now for one of the Evening Standard's newsletters. From a daily news briefing to Homes & Property insights, plus lifestyle, going out, offers and more. For the best stories in your inbox, click here.