Five UK Supreme Court judges on Wednesday ruled on a government appeal against a lower court judgment that its Rwanda policy for migrants is unlawful.
The ruling is the latest installment in a long-running saga, with implications for a crackdown on rising immigration.
The Migration and Economic Development Partnership, signed in April 2022, is effectively a one-way ticket to Rwanda for anyone who has made what the British government calls "dangerous or illegal journeys, such as by small boat or hidden lorries" to the UK.
The UK will cover the cost of Rwanda processing each deportee, with a view to them staying in the African nation.
Boris Johnson's administration said at the time that new solutions were needed to overhaul the asylum system, as it was failing to cope with a global rise in migration.
The government is banking on it being a deterrent to record numbers of migrants attempting to cross the Channel from northern France in inflatable dinghies and other unsuitable craft.
Johnson's supporters welcomed the policy as a way to deal with "small boats" crossings and ease pressure on housing and social services from a growing backlog of asylum cases.
However, opponents have claimed the policy is in breach of international law on asylum and refugees, as well as impractical, immoral, complicated, and expensive.
The first deportees were on a plane and ready to fly to Rwanda in June 2022 until a last-minute injunction from the European Court of Human Rights.
Nobody has been deported under the scheme so far.
The government has asked the UK's highest court to rule on the legality of the scheme after several lower court hearings.
The Court of Appeal in June this year overturned a December 2022 High Court ruling that the deportation plan was broadly lawful, assessing that Rwanda was not a safe third country because of "deficiencies" in its asylum system.
Those shortcomings raised the risk that claimants could be returned to their home countries where they could face persecution, in breach of Article 3 of the European Convention on Human Rights (ECHR) outlawing torture and inhuman treatment.
"Unless and until" those deficiencies are corrected, deportation from the UK would be unlawful, judges said.
Immigration was a key issue in the 2016 Brexit referendum and is likely to remain so at the next UK general election, expected at some point in 2024.
Failure in the case will force the government to go back to the drawing board to try to drive down numbers, and likely trigger calls from right-wingers for the UK to withdraw from the ECHR.
But even success could be problematic, with potential challenges from individuals — all with time running out until the nationwide vote.