Authorities in the western port city of Maracaibo released a U.S.-flagged cargo ship and its captain after investigating an undeclared weapon found on the vessel, Venezuelan Foreign Minister Nicolas Maduro said Tuesday.

"A check was made of a gun that had not been declared and the judge decided to free the captain and allow the ship to leave," he said in an aside during a press conference called by President Hugo Chavez.

U.S. diplomatic sources told Efe last week the Ocean Atlas had been ordered to remain in port at Maracaibo and that the ship's skipper had been taken into custody.

The captain was taken to the headquarters of Venezuela's Sebin intelligence service, Maracaibo newspaper Panorama said last Friday on its Web site.

The case of the Ocean Atlas came a month after Venezuela detained a U.S. citizen who, according to Chavez, admitted to having served with the Marines and appeared "to be a mercenary."

That person remains in custody pending a judicial process, Chavez said at Tuesday's press conference.

The U.S. diplomatic sources said they have consular access to the alleged former Marine, adding that they cannot say more because the individual has withheld permission to release his name or any other personal details. EFE