Six Americans imprisoned for more than a month in Honduras have been freed, CNN reports.

The group was detained in May on suspicion of smuggling weapons into the country when Honduran officials boarded their ship and found two handguns, two shotguns and a semiautomatic rifle, news reports say.

Ship captain Robert Mayne, speaking from his prison cell, told CNN the weapons were to protect the crew against the possibility of pirates at sea.

Now the Americans have been freed after a month and a half. A U.S. congressman who had been writing letters and lobbying for their release went to the Central American country and told CNN they'd been freed.

"It is with great pleasure I am able to announce the safe release of six Americans wrongfully imprisoned in Honduras," Rep. Mike Fitzpatrick, R-PA, said in a statement. "The crew of the Aqua Quest, including the son of one of my constituents, is in the process of traveling back to the United States and being reunited with their families following the ordeal."

The Americans had gone to Honduras to train a local tribe to scuba dive and pull mahogany logs from rivers to ease flooding, according to a WTSP report.

The families of the former captives say the Aqua Quest crew, composed of Robert Mayne, James Kelly Garrett, Devon Butler, Nick Cook, Steve Matanich and Michael Mayne, was released after its case was dismissed.

After the crew was released, Rep. Gus Bilirakis release a statement saying: "The case against them was dismissed, and rightfully so. They traveled to Honduras to help people and were wrongfully incarcerated in deplorable conditions. Their release, while long overdue, is a relief to all, especially their families and friends. These men deserve their freedom and now, thankfully, they can return to the wanting arms of their loved ones," according to WTSP.