MEXICO CITY - Panamanian officials Tuesday sought to unravel the mystery surrounding a rusty North Korean freighter in whose hold they found what experts said were parts of an obsolete Soviet-era anti-aircraft missile system hidden beneath sacks of sugar.

Among the unanswered questions: Did the ship — which has a reputed history of smuggling — load the cargo during a stopover in Cuba? And why would it be carrying the decades-old hardware to North Korea, which already has plenty of such systems?

Finally, why did the captain attempt suicide and his crew put up a fierce struggle when an armed Panamanian security team boarded the vessel?

The freighter, identified as the Chong Chon Gang, was tied up in Manzanillo, a port on the Atlantic Ocean side of the Panama Canal, where work crews toiled Tuesday to clear all of its cargo holds as they searched for more contraband.

"The world should know that one can't transit through the Panama Canal with undeclared war materiel," President Ricardo Martinelli told Radio Panama on Monday night. "Panama is a peaceful country, not a country of war."

The 508-foot-long vessel was detained last Wednesday after it arrived from Havana at the entrance of the canal en route to the Pacific Ocean, Security Minister Jose Raul Mulino said. The freighter was stopped after authorities received intelligence that it was carrying a large quantity of narcotics, he said.

When an armed security team arrived to inspect it on Saturday night, the 35 North Korean crewmen grew agitated, he said. "The captain tried to commit suicide. There was a riot among the sailors," Martinelli said.

The ship was laden with some 250,000 sacks of brown sugar, Mulino said. The 100-pound sacks appeared stacked to hide chambers or containers, he said.

Between the rioting of the crew and the removal of an initial layer of sugar sacks, the inspection process has been slow, he said.

Mulino said that the matter probably would be referred to the U.N. Security Council, which forbade North Korea from trafficking in any weapons systems after its nuclear tests in 2006 and 2009 and a successful satellite launch in December.