WHEN Donald Trump announced on July 9th that he had picked Brett Kavanaugh to succeed Justice Anthony Kennedy, the Supreme Court nominee offered a capsule account of how he reads the law. “My judicial philosophy is straightforward”, he said. “A judge must interpret statutes as written”. Paying close attention only to the text of a law and not venturing into ruminations on lawmakers’ supposed purposes or intentions may sound like a spare, noble statement of a judge’s role. But juxtaposed with Mr Kavanaugh’s third oral argument as a sitting justice, the statement sounds rather simplistic.

Nielsen v Preap, at argument before the justices on October 10th, boils down to how harshly the government can treat immigrants. But that question seems to turn on the meaning of a single word: “when”. In colloquy with Zachary Tripp, the lawyer who argued on behalf of the Trump administration, and Cecillia Wang, who represented immigrant plaintiffs, all nine justices struggled to interpret a provision of the Immigration and Nationality Act (INA) hinging on the meaning of “when”—and were split over how to read it.

The provision in question in Preap concerns the detention of immigrants who have committed crimes and been released from criminal custody. Congress wrote in 1996 that the attorney-general “shall take into custody” any immigrant who had been apprehended for crimes of moral turpitude, and that the transfer should happen “when the alien is released”. All agree that “shall” means federal authorities have no choice in the matter: it is mandatory that immigrants who served time for qualifying crimes would then be detained by immigration agents pending a decision on whether they should be deported. But it is one thing to pass directly from criminal to immigration custody, and quite another to be sent home for months or years and then, one day, without warning, picked up by federal agents.

The litigants in Preap include Mony Preap and Eduardo Vega Padilla, two men who came to America as infants. Mr Preap, whose family fled persecution under Cambodia’s Khmer Rouge, has been a lawful permanent resident since 1981. In 2006, he was convicted on two counts of marijuana possession and served his sentences. Mr Padilla has had his green card since 1966; he too was found guilty of a pair of charges for drug possession and, later, for illegally owning a firearm. Both men served time for their misdeeds and were released back into their communities; both were surprised years later when they were suddenly brought back into custody and threatened with deportation without an opportunity for a bond hearing. In Mr Padilla’s case, the gap was 11 years.

Can the government wait years to begin removal proceedings against a green-card holder on the basis of an old conviction, keeping him locked up with no opportunity to plead his case for release on bond? The Ninth Circuit Court of Appeals said no. An immigrant may be detained without bond if it is found that he poses a flight risk or is a danger to the community. But he cannot be held in mandatory detention with no opportunity for a hearing. The statute, effectively, contains a statute of limitations, the Ninth Circuit held. Mandatory detention applies “when the alien is released”—that is, at the time of his release—not years after he is sent home. Ms Wang recommended this reading to the justices. A “person who is detained immediately falls under Congress's scheme”, she said, but the law does not apply to people who are rounded up later on. Justice Samuel Alito pushed the point: “Does ‘when’ mean immediately?” Yes, replied Ms Wang. “So as soon as the person walks out of the door of the prison or the jail”, Justice Alito continued, “if ICE doesn’t take the person into custody at that point, that’s the end of it?” Here Ms Wang encouraged the Supreme Court to follow the Ninth Circuit’s formulation. “A reasonable degree of immediacy”, she said, is appropriate, or, in other words, “the same day”.

This answer did not satisfy either Justice Alito or Chief Justice John Roberts, who wondered what the difference might be between a “reasonable degree of immediacy” and a “reasonable time”. Justice Kavanaugh would have none of it: “Congress did not put in a time limit” of any kind, he said. Should the justices “superimpos[e] a time limit into the statute when Congress, at least as I read it, did not itself do so?” No, Ms Wang replied. “We’re asking you to give meaning to all the words of the statute that Congress enacted”. Deviating from his own commitment to consider only text, Justice Kavanaugh proposed that "what was really going through Congress's mind in 1996 was harshness on this topic". (Duelling amicus briefs from members of Congress took opposite sides on this very point.)

If Ms Wang had some trouble insisting that “when” connotes immediacy, Mr Tripp met even more resistance with his contention that the law provides for no time limit at all. Justice Stephen Breyer pressed the matter most forcefully. An immigrant “on his death bed” who stole “some bus transfers” 50 years ago can be held without bail, he said with some incredulity to Mr Tripp, while a citizen who is a “triple axe murderer” gets a hearing? When no direct answer came, Justice Neil Gorsuch grew antsy. “Justice Breyer's question is my question”, he said, “and I really wish you'd answer it”. When the justices finally got an answer—the window on detaining immigrants with criminal histories is, indeed, always open—Justice Gorsuch had a response to his earlier question. “Is there any limit on the government's power?” Not so much.

In another immigration case last term, Justice Gorsuch, Donald Trump’s first appointee to the Supreme Court, joined the court’s four more liberal justices to strike down a provision of the INA permitting the government to deport any immigrants, including green-card holders, who had been convicted of an “aggravated felony”. If this curious lineup is in the cards for Preap, too, thousands of immigrants may find themselves breathing a little easier.