A federal appeals court ruled Monday that the Immigration and Naturalization Service must release convicted criminals who, because of quirks of bureaucracy and international diplomacy, sit in U.S. jails long after they’ve served their time.

The 9th U.S. Circuit Court of Appeals held that a resident alien who served more than two years for gang-related manslaughter should be released from an INS detention facility near Seattle, since his native country, Cambodia, refused to repatriate him.