In a massive defeat for the British prime minister, the United Kingdom’s Supreme Court unanimously ruled Wednesday that the government’s controversial immigration policy is unlawful.

The country’s top court has blocked Prime Minister Rishi Sunak’s flagship policy that would send asylum-seekers to Rwanda, whose authorities would process their claims.

“There are substantial grounds for believing that asylum seekers would face a real risk of ill-treatment” by being sent back to “their country of origin if they were removed to Rwanda,” the court said.