A Cuban man who was living in the country illegally and was charged with a sex crime in Beulah pleaded guilty and was ordered to voluntarily leave the U.S. but is now in federal custody.