Updated

A Marine veteran chained to a bed in one of México’s most notorious prisons will be home for Christmas.

A Mexican judge in Matamoros ordered the immediate release of Jon Hammar Friday morning. He had been detained August 13 for bringing a .410 antique shotgun over the border while en route to a surfing trip. He and a friend, who was also detained but released after three days, were travelling on a 1972 refurbished Winnebago motor home.

The Mexican court ruled that Hammar, who served seven years in Iraq and Afghanistan and who suffered from post traumatic stress disorder, had no criminal intent to bring the antique 60-year-old rifle across the border and had his constitutional rights violated.

"I am on pins and needles," Olivia Hammar, the mother, said early Friday before the announcement. "I have heard that we would hear this morning and I know they are an hour early, but I have been up since 4:30 ... Just waiting to hear."

Hammar's father Jon was on route from South Florida to meet his son.

He said that after spending four months in a prison his son is not ready for a flight, so together they will drive back home in time for Christmas.

The news of the release ends a four-month ordeal for the Hammar family, who was subjected to extortion calls from jailed cartel members and the pain of seeing their son chained to a bed in the administrative offices of the Matamoros State prison. A photo of Hammar in jail was anonymously emailed to his parents Sunday night.

“We are so very grateful with all of the people that have been working on his release,” said Hammar's close friend, Jessica Fernandez. “Our voices were heard.”

Hammar and his fellow Marine friend, Ian Mcdonough, both 27 years old, were held back in August on federal charges of possessing a weapon reserved for military use. Hammar and his family said the gun was his great grandfather's antique Sears & Roebuck shotgun and was properly declared to U.S. border agents. Hammar said that, when instructed, he declared the weapon with Mexican customs agents. And yet both he and his friend were arrested.

Hammar garnered national attention thanks to the “Free Jon Hammar” Facebook group and an online White House petition, which accumulated over 26,000 signatures.

His release came just days after the Mexican Ambassador Arturo Sarukhan sent a letter to the Hammar family and Rep. Illeana Ros Lehtinen (R-Fla) reiterating that Hammar “would remain in detention for the duration of his trial" on January 17.  In the letter, the ambassador noted Hammar's military service but reiterated México's "very stringent gun control laws" particularly "as a result of the weapons illicitly purchased in the U.S. and then trafficked into México."

Rep. Ros Lehtinen, the chairwoman of the House Foreign Affairs Committee, and Sen. Bill Nelson (D-Fla.) led the push in Washington D.C. in demanding Hammar's release. Sen. Nelson exhorted México to release Hammar.

“No American should be in a Mexican jail for five months without being able to have his case in front of a judge,” Nelson said in a statement. “We’re grateful; this is a good Christmas present.”

For four months, the Hammars insisted the .410 shotgun was not illegal and pointed to a letter sent to them from the Secretary of Defense in México dated August 24 that assured the Hammar family the antique shotgun is not a weapon used by the Mexican military.

Outrage over Hammar's arrest also grew in México especially after a group of 14,000 businessmen expressed their concern in a letter written early this week over strained relations between neighboring countries that could have ultimately hurt México's tourism industry.

"It's a big relief for us at the border," said Gerardo Acevedo Danache, Vice President of CANACO and the head of the Chamber of Commerce in Matamoros. "We are neighbors, we don’t need this kind of situation and it shows we can work things out."

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino