A Mexico judge has ordered the release of a U.S. Marine jailed for months on weapons offenses, U.S. media reported on Friday.

Andrew Tahmooressi, 26, was arrested on March 31 by Mexican customs agents who found three guns in his pickup truck at a border crossing between San Diego and Tijuana. He was charged with weapons offenses and has been imprisoned ever since.