Ahilan Nadarajah was detained as a terrorism suspect for nearly five years before he got to argue his case before the 9th U.S. Circuit Court of Appeals. It only took a three-judge panel 10 days to order his release.

In a unanimous decision Friday, Judge Sidney Thomas wrote that federal immigration officials can’t detain an asylum seeker indefinitely after an immigration court orders his release. Thomas wrote that the government’s interpretation that a Supreme Court opinion allowed indefinite detention was “patently absurd.”