LONDON (AP) — A British government’s plan to deport asylum-seekers of various nationalities to Rwanda is set to go ahead after an appeals court on Monday refused to block the policy that the U.N.’s top refugee official said sets a dangerous precedent for migrants fleeing war and oppression.

Immediately after the decision by a three-justice panel of the Court of Appeal in London, Prime Minister Boris Johnson’s office said the first deportation flight would go ahead as scheduled on Tuesday.

Migrant advocacy groups have attacked the policy as inhumane and illegal ever since April, when Johnson announced the plan as way to deter people from risking their lives by paying smugglers to take them to Britain in leaky inflatable boats.

Filippo Grandi, the U.N. high commissioner for refugees, lashed out against the policy, describing it as “all wrong.”

If the British government is truly interested in protecting lives, it should work with other countries to target the people smugglers and provide safe routes for asylum seekers, not simply shunt migrants to other countries, Grandi said after the ruling.

“The precedent that this creates is catastrophic for a concept that needs to be shared, like asylum,” he told reporters in Geneva.

Monday’s ruling was focused on the narrow question of whether a temporary injunction should be issued blocking deportation flights to Rwanda while a case challenging the legality of the policy moves through the courts.

A coalition of immigration rights advocates and public employees unions had asked the Court of Appeal to overturn a lower court ruling, arguing that the judge had made a mistake when he decided Friday not to issue an injunction.

But the Court of Appeal rejected the case, saying the judge had properly balanced the issues before him. Under U.K. law, a court must find there is strong evidence a government policy is likely to be ruled illegal before it can issue a temporary injunction.

Further legal challenges are under way. A similar case filed by lawyers representing a different group of plaintiffs was heard in the High Court on Monday.

While a major precedent is at stake, the number of people immediately affected by the cases has been steadily whittled down as lawyers challenge the merits of each deportation order. The charity Care4Calais said all but eight of the 31 migrants originally told they would be on the flight to Rwanda have had their tickets canceled.

Raza Husain, one of the lawyers for the migrants, argued Monday that the government’s plan involved the forced removal of asylum-seekers to a country they don’t want to travel to as part of a policy intended to deter others from trying to enter Britain.

“This amounts, on any view, to a serious interference with basic dignity … where those individuals have already suffered significant trauma and have mental health issues,” he said in documents filed with the court.

The court cases came amid a bitter political debate over Johnson’s deportation plan.

Migrants deported under the program would be forced to apply for asylum in Rwanda, not Britain. The U.K. paid Rwanda 120 million pounds ($158 million) up front and will make additional payments based on the number of people deported.

The leadership of the Church of England has joined the opposition, sending a joint letter to the Times of London to be published Tuesday.

“Whether or not the first deportation flight leaves Britain today for Rwanda, this policy should shame us as a nation,” the letter said. “The shame is our own, because our Christian heritage should inspire us to treat asylum seekers with compassion, fairness and justice, as we have for centuries.”

According to newspaper reports, Prince Charles has also waded into the issue. The heir to the throne privately described the Rwanda policy as “appalling,” the Times reported over the weekend, citing an unidentified source. Charles’ office declined to comment, while insisting the Prince of Wales was politically neutral.

Johnson defended the policy.

“I think that most people can see that the criminal gangs … need to be stopped,″ he said. “That model needs to be frustrated.″

He also dismissed the significance of the legal challenges.

“I always said that it will begin with a lot of teething problems and you will have a lot of legal action against it and they will try and delay it – that’s inevitable,″ he said during a visit to a farm.

—-

Associated Press Writer Jamey Keaten in Geneva contributed.