The government's plan to deport migrants to Rwanda is lawful, the High Court has ruled.
The court ruled on Monday that the scheme did not breach the UN's Refugee Convention or human rights laws.
But the cases of eight asylum seekers had not been "properly considered" and would need to be reconsidered, judges added.
Home Secretary Suella Braverman said she is committed to making the Rwanda policy work.
A hearing will take place in January to deal with any appeal applications.
Ms Braverman said: "We have always maintained that this policy is lawful and today the court has upheld this.
"I am committed to making this partnership work - my focus remains on moving ahead with the policy as soon as possible and we stand ready to defend against any further legal challenge."
Criticising the government's decision to progress with the plans, Labour's shadow home secretary Yvette Cooper called the policy "unworkable, extortionate and deeply damaging".
Responding to a statement by Ms Braverman in the Commons, she said: "Instead of sorting out problems with the asylum system, the Conservatives have put forward a plan which risks making trafficking worse."
But Ms Braverman accused Labour of "seeking to go behind a decision set out by our independent judiciary to suggest this is an illegitimate scheme".
Former Home Secretary Priti Patel announced the government's plan to deport some people to Rwanda back in April.
The first deportation flight, which was due to take off on 14 June, was grounded following a series of objections from lawyers for several asylum seekers, along with the Public and Commercial Services union (PCS) and charities Care4Calais and Detention Action.
Rishi Sunak said he welcomed the High Court ruling, calling it a "common sense position" that was supported by "the vast majority of the British public".
Speaking to broadcasters during a visit to Riga, Latvia, the prime minister said: "We've always maintained that our Rwanda policy is lawful, and I'm pleased that was confirmed today."
Alison Thewliss, the SNP's home affairs spokesperson at Westminster, called the Rwanda plan "deeply immoral".
She told the Commons: "Those fleeing war, famine and oppression deserve and need our full support."
Responding to Ms Thewliss, Home Office Minister Robert Jenrick said the plans were designed to "simplify" a "too complicated and too bureaucratic" immigration system.
He said: "The Scottish government are refusing to take any of the asylum seekers who are arriving in the UK on small boats. That is not right. There is a widening gulf between the actions of the Scottish government and their rhetoric."
This is a major victory for the government because the High Court has found that not only does the law allow ministers to relocate some asylum seekers to another country, for their claims to be dealt with there, but they had also acted rationally in the way they set up the partnership with Rwanda.
But will there be a day when flights depart, as the home secretary says she dreams?
Appeals are almost inevitable, and it could be months before they are dealt with. Then there could be a further challenge to the Supreme Court, if there's a major dispute about what a particular point of law means.
And then... individual migrants earmarked for a flight could try to petition the European Court of Human Rights in Strasbourg - that's assuming the judgement's ruling that more care needs to be taken on each case doesn't add even more delays.
So the government is not putting a timescale on flight for good reason. They're currently winning on the principle of the law - but can they really put it into action before the next general election...?
Clare Moseley, founder of refugee charity Care4Calais, called the decision on Monday "disappointing".
She said: "People who have suffered the horrors of war, torture and human rights abuses should not be faced with the immense trauma of deportation to a future where we cannot guarantee their safety."
Josie Naughton, chief executive of migrant charity Choose Love, said the ruling "flies in the face of international commitments and accountability", adding that campaigners will "continue to fight" for the "human right to seek asylum".
The Labour Party also branded the government's Rwanda plan "unworkable" and "unethical".
James Wilson, deputy director of Detention Action, said: "We are disappointed that the High Court has found the removal of refugees to an autocratic state which tortures and kills people is lawful. However, we will fight on.
"The Rwanda policy is brutal and harmful and we will now consider an appeal against today's judgment."
However, Ms Patel called for ministers to "press ahead" with the policy as she welcomed the judgement.
She said: "No single policy will stop the Channel crossings, but this important policy will save lives, help break the business model of the criminal gangs and prevent asylum abuse."
Former Prime Minister Boris Johnson said on Twitter: "It is welcome news that the High Court has ruled that the Rwanda policy is lawful.
"It is one of the only humane ways of dealing with the vile people trafficking gangs who are exploiting so many people."
Rwandan government spokeswoman Yolande Makolo added: "We welcome this decision and stand ready to offer asylum seekers and migrants safety and the opportunity to build a new life in Rwanda.
"This is a positive step in our quest to contribute innovative, long-term solutions to the global migration crisis."
Rishi Sunak's official spokesman said the Prime Minister welcomed the High Court's ruling.
He did not give a timeframe for flights taking off, but added: "We want to go as quickly as possible."