A cruise ship intended to house hundreds of asylum seekers has reportedly been refused permission to dock in Edinburgh amid international condemnation at the UK Government’s flagship Illegal Migration Bill passing through Parliament.

The legislation has been denounced by the United Nations and human rights charities.

The Bill, central to Prime Minister Rishi Sunak’s pledge to “stop the boats” crossing the Channel, breaks the UK’s obligations under international law, the UN said in an unusually critical statement.

The intervention comes after a night of drama in which the Tory frontbench saw off changes being sought by peers to the Illegal Migration Bill, including modern slavery protections and child detention limits.

Read more: UK Government frustrated with Lords over immigration bill hold-up

The cessation of the stand-off between the Lords and MPs paves the way for the Bill to receive royal assent and become law.

The reforms will prevent people from claiming asylum in the UK if they arrive through unauthorised means.

The UK Government also hopes the changes will ensure detained people are promptly removed, either to their home country or a third country such as Rwanda, which is currently the subject of a legal challenge.

The Bill encountered fierce opposition in the upper chamber, while UN human rights chief Volker Turk and UN high commissioner for refugees Filippo Grandi led national and international outrage at the plans.

In a joint statement, they warned the Bill “will have profound consequences for people in need of international protection”.

Read more: Labour government could continue using barges to house asylum seekers

“This new legislation significantly erodes the legal framework that has protected so many, exposing refugees to grave risks in breach of international law,” Mr Grandi said.

Mr Turk said: “Carrying out removals under these circumstances is contrary to prohibitions of refoulement and collective expulsions, rights to due process, to family and private life, and the principle of best interests of children concerned.”

They said the legislation will expose people to the danger of “detention and destitution” and put at risk “their rights to health, an adequate standard of living, and to work”.

Sacha Deshmukh, Amnesty International UK’s chief executive, said the legislation being approved is “an extremely bleak day for human rights in this country”.

He added: “Disqualifying people’s asylum claims en masse regardless of the strength of their case is a blatant assault on international law and is a failure of UK leadership.

“Ministers are using vulnerable and traumatised people for political ends - feeding the public misinformation about asylum issues, stoking resentment and division, and then pushing through ever more extreme measures to perpetuate the same policies that keep doing so much harm.”

Read more: Small boats: The Illegal Immigration Bill  - explained

Meanwhile, reports suggest that two vessels set to accommodate 1,000 refugees on behalf of the UK Government in Edinburgh and Liverpool have returned to their owners after being unable to find anywhere to dock.

Last month, Rishi Sunak announced the UK Government had acquired two more cruise ships alongside the Bibby Stockholm barge, which has now arrived in Dorset.

Sky News reported that plans for one of the cruise ships to accommodate asylum seekers near Liverpool were cancelled after it was declined permission to dock by the operator, while it is also understood another vessel was refused permission to dock near Edinburgh.

Asked if Mr Sunak was disappointed with the news, the Prime Minister’s official spokesman said: “I’ve seen that reported.

"For our part, we are continuing discussions both in terms of those who can provide additional accommodation facilities and sites where it can be housed.

“That will continue. We want to open more, obviously Bibby Stockholm has arrived today and will be taking people on board this month.”

The Home Office said it could not comment on commercial arrangements, but said the government had been looking at a "range of accommodation options which offer better value for the British taxpayer than expensive hotels".

A spokesperson added: "This is why we will be using alternative accommodation options, such as barges, which are more manageable for communities, as our European neighbours are doing".

Downing Street defended the use of barges to house migrants, insisting it was a cheaper alternative to housing them in hotels.

Mr Sunak’s spokesman said the Bibby Stockholm is “undergoing final inspections upon arrival”.

He added: “That’s the last part of the process ahead of the first group of asylum seekers moving into the vessel later this month.”