Franks said the judge released him without making a determination on the charge against him.

The family issued the following statement: "It is with an overwhelming and humbling feeling of relief that we confirm that Andrew was released today after spending 214 days in Mexican Jail."

The 26-year-old Florida man said he got lost on a California freeway ramp that sent him across the border with no way to turn back. His long detention brought calls for his freedom from U.S. politicians, veterans groups and social media campaigns.

In Mexico, possession of weapons restricted for use by the Army is a federal crime, and the country has been tightening up its border checks to stop the flow of US weapons that have been used by drug cartels.

His attorney, Fernando Benitez, says Tahmooressi carries loaded guns with him because his weapons, which were bought legally in the U.S., make him feel safer. He is often distracted, which could have contributed to him becoming lost, Benitez said.

Still, Mexican prosecutors say Tahmooressi broke the law, and they have denied claims by his attorney that he was held for about eight hours without a translator before authorities notified the U.S. Consulate.

But a psychiatrist hired by Mexican prosecutors to examine the Afghanistan veteran agreed with the defense that he should get PTSD treatment in the United States, noting in a Sept. 30 report that Tahmooressi, who now serves in the Marine reserve, feels like he is constantly in danger.

Tahmooressi did not admit wrongdoing, and he still maintains his innocence, his attorney said.

His mother, Jill Tahmooressi, has said her son's time in a Mexican jail has been worse than his two tours in Afghanistan.

Tahmooressi left Florida for San Diego in January to get help after dropping out of college, unable to concentrate or sleep, his mother said.