T OWARDS THE end of Franz Kafka’s “The Trial”, Josef K, the protagonist, gets some advice. There is no such thing as a definite acquittal, the court artist tells him; the court “forgets nothing”. Whenever they like, the authorities can renew their charges against the released defendant. When they do, Kafka writes, “his life as a free man is at an end.”

American law emulated Kafka on March 19th when a 5-4 Supreme Court majority ruled that many immigrants who had been held in criminal custody are subject to mandatory detention by Immigration and Control Enforcement ( ICE ) at any time after their release. Eduardo Vega Padilla, one of the litigants in Nielsen v Preap, came to America in the 1960s as an infant. In the late 1990s he was twice convicted for possessing drugs and, in 2002, for illegally (as a previous felon) owning a firearm. In 2013, 11 years after finishing his six-month sentence for the gun conviction, Mr Padilla found himself on the brink of being deported to Mexico, a country he left when he was 16 months old.

The question the justices tackled in Preap was how to interpret a law of 1996 requiring the detention of certain immigrants “when the alien is released” from criminal custody. The Ninth Circuit Court of Appeals ruled in 2016 that green-card holders may not be nabbed and held indefinitely without a bail hearing long after being released. The law, the appeals court said, permitted ICE to swoop in only at the time of the immigrant’s release. If authorities wanted to detain an alien later, they would have to give him a hearing.

For Justice Samuel Alito, author of the majority in the latest ruling, that reading is “hard to swallow”. Requiring that the “alien must be arrested on the day he walks out of jail” unreasonably constrains ICE authority, he says. The law would amount to “nonsense” if it were understood to favour Mr Padilla and his fellow plaintiffs. Mandatory detention would be “downright incoherent” if it did not require the detention of every alien who has committed an offence listed, at any time.

In dissent, Justice Stephen Breyer wrote that the case concerns “basic American legal values”. It has “consequences” for green-card holders who have “established families and put down roots in a community”. The ruling threatens to deprive people of their liberty without “due process of law” and to strip them of “the longstanding right of virtually all persons to receive a bail hearing” when held in custody. A six-month limit on re-arrest, Justice Breyer wrote, is reasonable and squares with other detention time frames.

A long-running disagreement fuels the split between the court’s liberals and conservatives: how to read statutes. Whereas the Alito majority in Preap takes a magnifying glass to the words on the page and strives to understand them without reference to anything else—an approach known as “textualism”—the Breyer dissent takes a broader view, considering the purposes that lie behind the law. “I would have thought that Congress...did not intend to allow the government to apprehend persons years after their release from prison,” Justice Breyer wrote.