Even by the standards of North Korea's dilapidated shipping fleet, which often carries contraband and sails vessels until they sink, the failed attempt to transport Cuban arms through the Panama Canal, hidden under bags of raw brown sugar, was a risky business.
Caught carrying narcotics in Ukraine in 2009, the Chong Chon Gang vessel was already known to law enforcement and was plying waters closely watched by the United States before it was seized in Panama last week.
Just bearing a North Korean flag is enough for a ship to raise the suspicions of port authorities and coast guards. North Korea is infamous for running one of the world's most unsafe merchant marine fleets, a collection of around 250 rusting ships that are mostly decades old.
Panama's top prosecutor Javier Caraballo said the ship's captain and 35 crew had been charged with "attempts against Panama's security" and "illegally transporting undeclared military equipment", in possible violation of UN sanctions.
Despite requests from the North Korean foreign ministry to release the crew, Caraballo said they would remain while the ship was searched further.
Ramon Lopez, operations director for Panama's National Aeronautics Service, said there had been "a lot of tension and strong resistance" during a three-day inspection of the ship.
With so many eyeballs on North Korea and its vessels, the Chong Chon Gang's voyage "smacks of desperation and stupidity," said Hugh Griffiths of the Stockholm International Peace Research Institute (SIPRI).
"There's nowhere else on the planet where an interdiction is more likely to occur than in the Caribbean, because that is the US backyard and where the highest number of interdictions have happened," added Griffiths, who runs a SIPRI programme on countering illicit trafficking.
A US intelligence official said Panama had used information from the United States to help it seize the ship carrying missile equipment, MiG fighter jets and other arms.
North Korean ships are always under close scrutiny because of UN sanctions that were imposed after Pyongyang carried out a series of nuclear bomb tests that began in 2006, and the shipment appears to be a violation of sanctions.
Trips to the western hemisphere are rare for North Korean ships, which are mostly workhorses that carry cheap cargo like scrap metal and feed grain in Asian waters.
It is not known why the Chong Chon Gang and its crew risked going through the Panama Canal instead of taking a longer, less conspicuous route.
But the fact that it was carrying tons of Cuban sugar in apparent barter payment for missile repairs shows how eager North Korea is for basic supplies.
While North Korea has recovered from a famine in the 1990s, tightening UN sanctions and further estrangement from wealthy neighbours South Korea and Japan in recent years have kept the country short of cash and some food.