After 18 months in custody , he was released by the U.S. military in October , 2003 .