Britain on Thursday said a new treaty to send migrants to Rwanda could be ready for ratification "within days" after a court blocked an earlier and controversial agreement as unlawful.

The new treaty, which would then take at least three weeks to be approved by UK lawmakers, follows a Supreme Court ruling Wednesday that the current deal between the two countries should not go ahead.

It was a major setback for Prime Minister Rishi Sunak, who is under pressure to reduce irregular immigration to Britain.

Sunak immediately vowed to persevere with the controversial plan by securing a new treaty with Kigali.

A five-judge panel at the UK's highest court had unanimously sided with an earlier Court of Appeal decision that the policy to deport asylum seekers and refugees to Rwanda was incompatible with Britain's international obligations.

The judges agreed it was not a safe third country and there were "substantial grounds" to believe it could forcibly return migrants to places where they could face persecution.

Sunak has announced plans to introduce "emergency legislation" to parliament to designate Rwanda a safe country to end the "merry-go-round" of legal challenges.

"It is ready pretty much now to turn into a treaty that can be done within days -- not weeks or months," interior minister James Cleverly told Sky News on Thursday.

He added the legally-binding treaty would stipulate Kigali cannot deport migrants sent from Britain onto other countries which could be deemed dangerous, in a bid to negate the legal concerns.

"We've been told by the judges what it is we need to fix in order to get these flights off the ground -- we are fixing those things," Cleverly said in another interview with Times Radio.

'Stop the boats' 

The Migration and Economic Development Partnership agreed in April last year envisages sending to Rwanda anyone who has made what London calls "dangerous or illegal journeys" to Britain on boats and hidden in lorries.

The first deportees were aboard a plane to fly to the African country in June 2022 when a last-minute ECHR injunction prevented any deportations, prompting the legal challenges.

The government insists the scheme is crucial to deter "illegal" immigration across the Channel from France on inflatable vessels -- an emotive issue set to feature prominently in the next general election.

More than 27,000 have made the perilous journey this year -- down on the nearly 46,000 who crossed in 2022, but still far short of meeting Sunak's vow to "stop the boats".

The Supreme Court decision has exposed rifts in the ruling Conservative party over the issue, and is set to prompt a renewed push from right-wingers for withdrawal from the European Court of Human Rights (ECHR).

Sunak said Wednesday that if the court "chooses to intervene against the express wishes of parliament, I am prepared to do what is necessary to get the flights off".

But in his interviews, Cleverly noted that Britain's "preferred option" was to remain in the ECHR.

"We don't think we're going to need to (leave)," he said.