Panama has charged the crew of a North Korean ship detained in Panama after it was found to be carrying weapons.
Prosecutor Javier Caraballo accused the 35 crew members of endangering public security by illegally transporting war material.
The charges came just hours after North Korea urged Panama to release the ship and its crew without delay.
Police found the weapons under bags of sugar. Cuba has said it had sent the weapons to North Korea for repairs.
Panama has asked the UN to investigate whether there has been a breach of the sanctions against North Korea.
The UN sanctions prohibit the supply of arms to Pyongyang in the dispute over its controversial nuclear programme.
"According to its declaration, the ship only carried 10,000 tonnes sugar, it never declared war material and that in itself is a violation of the rules and a grave danger for the transit through the Panama canal," Mr Caraballo said.
He said the crew had remained silent when the charges against them were brought.
They will remain in detention while Panamanian security forces continue to unload the cargo under which the weapons were hidden.
Panama's Security Minister Jose Raul Mulino said the ship and its cargo had broken Panamanian and international law.
"This is not an official or military ship belonging to the North Korean government."
"It's a commercial ship which wanted to pass through the Panama canal with a [cargo] declaration which failed to reflect what it was carrying, turning a blind eye to the fact that its cargo could be violating UN resolutions," he said.
According to the security minister, the search could take days.
"This ship was loaded in a way to make it hard to unload; the effort is enormous," he said.
On Wednesday, North Korea asked Panama to release the ship.
"This cargo is nothing but ageing weapons which are to be sent back to Cuba after overhauling them according to a legitimate contract," the North's foreign ministry was quoted as saying by the state-run Central News Agency.
Cuba had earlier admitted being behind the stash of weapons found on board the ship. It said they were Soviet-era arms from Cuba headed for repair in North Korea.
The Cuban foreign ministry said the Chong Chon Gang was carrying 240 tonnes of "obsolete" defensive weapons - two anti-aircraft missile complexes, nine missiles in parts and spares, two MiG-21bis fighter planes and 15 MiG engines.
Havana also reaffirmed its commitment to "peace, disarmament, including nuclear disarmament, and respect for international law".
The Chong Chon Gang left Russia's far east on 12 April and travelled across the Pacific Ocean before entering the canal at the start of June, with Cuba as its stated destination.
It was stopped near Manzanillo on the Atlantic side of the canal last week, but Panama only released details of the find on Tuesday.
The ship disappeared from satellite tracking systems after it left the Caribbean side of the canal, resurfacing on 11 July.
Experts say this may indicate that the crew switched off the system which automatically communicates details of their location.
Panama says it is awaiting the arrival of experts from the United Nations Security Council to inspect the weapons.