Panama has detained a North Korean ship coming from Cuba with what appeared to be ballistic missiles and other arms, Ricardo Martinelli, the country's president, has said.
Martinelli said late on Monday that the ship was targeted by drug enforcement officials as it approached the Panama Canal on the Atlantic coast of the country and was taken into port.
Javier Caraballo, Panama's top anti-drugs prosecutor, told local television the cargo ship was en route to North Korea.
The vessel's estimated 35-man crew also rioted when police stepped aboard, according to Martinelli, who said the suspicious cargo was found within a massive consignment of sugar.
Martinelli said on Tuesday that the ship was violating United Nations resolutions against arms trafficking.
"The world needs to sit up and take note: you cannot go around shipping undeclared weapons of war through the Panama Canal," he told Radio Panama listeners.
"We had suspected this ship, which was coming from Cuba and headed to North Korea, might have drugs aboard so it was brought into port for search and inspection.
"When we started to unload the shipment of sugar we located containers that we believe to be sophisticated missile equipment, and that is not allowed."
US state department deputy spokesman Patrick Ventrell on Tuesday commended Panama's search and seizure of a North Korean-flaggedship traveling from Cuba to the Panama Canal and offered Washington's help if requested.
"The United States strongly supports Panama's decision to inspect the [North Korean] flagged vessel," said Ventrell.
Panamanian authorities said the ship was being held and that they had detained the crew members.
"The captain has tried to commit suicide, and the crew rioted," the president said of what happened moments after the raid.
Martinelli said that the captain also had a heart attack.
He had earlier posted a photo on his Twitter account of what appeared to be a green tubular object sitting inside a cargo container or the ship's hold.
The president, who did not name the boat, said it was headed back to North Korea when stopped and taken to Manzanillo, east of the Atlantic opening of the Panama Canal, which is a major cargo distribution centre.
The vessel "aroused suspicion by the violent reaction of the captain and the crew from Friday afternoon", Panama's Security Minister Jose Raul Mulino said.
Caraballo said: "Until now we have not found drugs in the boat, we found military equipment."
North Korea carried out its third nuclear weapons test in February and then threatened to attack the US.
The North has for decades had a programme to develop missiles of all types.
Last December, it successfully launched a three-stage rocket which placed a satellite in orbit.
Pyongyang said the operation was a peaceful scientific mission, but the launch was widely condemned as a covert ballistic missile test banned under UN resolutions.
It is unclear whether the North has the technology to build a nuclear warhead for a missile.