Illegal immigrants with serious criminal records can be held without bail while awaiting deportation even if ICE didn’t immediately pick them up when they were released from prison or jail, the Supreme Court ruled Tuesday. The 5-4 decision marked another rejection for the 9th U.S. Circuit Court of Appeals, the liberal panel that covers the country’s West Coast, and that has tested a number of legal theories on immigration law. In this case, the 9th Circuit had ruled that under the law, if U.S. Immigration and Customs Enforcement immediately arrested someone released from a federal, state or local prison, they could be held without bond in the immigration detention system. But if ICE didn’t immediately arrest them, the migrants must be given a chance to make bond. The case turned on a phrase in the law that says the no-bail determination applies to someone picked up by ICE “when the alien is released” from prison or jail. The lower court ruled “when” must mean the day of release. But Justice Samuel A. Alito Jr., writing the majority opinion, said that could create a new loophole for sanctuary cities, which often refuse to alert ICE officers when releasing people from their local prisons and jails. “Under these circumstances, it is hard to believe that Congress made the secretary’s mandatory-detention authority vanish at the stroke of midnight after an alien’s release,” he wrote. He said it made more sense that “when” means at some point after the release, not at the exact moment of it. While many illegal immigrants are released while they await their immigration court proceedings and possible deportation, Congress has deemed some serious criminals to be such safety risks that they must be held by ICE while their cases proceed. Those are the ones affected by Tuesday’s ruling.