Updated

Thirty-two of 35 crew members and a North Korean ship seized for carrying hidden arms from Cuba can be released, a Panamanian prosecutor said Wednesday.

Three of the crew members, including the captain, will be detained and face charges of arms trafficking, said organized crime prosecutor Nahaniel Murgas.

"The 32 are being released because they didn't know about the cargo," Murgas said.

He said the ship was legally free to go. But according to the officials with the Panama Canal zone, the ship cannot move until the North Koreans pay a $1 million fine levied because the ship's crew threatened the canal's security by not declaring it was transporting weapons.  So far the fine has not been resolved, said canal legal adviser Alvaro Cabal.

A North Korean delegation arrived last week to negotiate the return of the ship and crew.

The ship, Chong Chon Gang, was headed from Cuba to North Korea when it was seized in the canal July 15 based on intelligence that it may have been carrying drugs.

The manifest said it was carrying 10,000 tons of sugar, but Cuban military equipment was found beneath the sacks. Crews unloading the North Korean-flagged ship found planes, missiles and live munitions on board.

U.N. sanctions state that member states shall prevent the direct or indirect supply, sale or transfer of all arms and material to North Korea, and related spare parts, except for small arms and light weapons.

A U.N. panel of experts monitoring sanctions against North Korea visited Panama in mid-August to investigate the arms seizure.

The Panamanian Security Ministry said a preliminary report by the panel determined "without a doubt" that the Cuban weapons violated sanctions restricting weapons trading with North Korea.

Cuba's Foreign Ministry acknowledged that the military equipment belonged to the Caribbean nation, but said it had been shipped out to be repaired and returned to the island. It said the 240 metric tons of weaponry consisted of two Volga and Pechora anti-aircraft missile systems, nine missiles "in parts and spares," two Mig-21 Bis and 15 engines for those airplanes. It never mentioned the live munitions found and has yet to comment to about them.

North Korea claimed it had a legitimate contract to overhaul aging weapons to be sent back to Cuba.

Officials say the ship carried two Cuban fighter jets in perfect condition, contradicting Cuba's explanation that the cargo included "obsolete defensive weapons."

The crew was being been held in a former U.S. military base in Colon, near where the ship was being held.