(CNN) -- Panama has released 32 of 35 detained crew members of a North Korean ship that last year tried to cross the Panama Canal with weapons smuggled aboard, an official said Thursday.
Panamanian Attorney General Ana Belfon said that the 32 would be deported Cuba or to other countries.
The captain and two other officers of the cargo ship, the Chong Chon Gang, will continue to be held and face charges of arms smuggling, said Nathaniel Murgas, head prosecutor in organized crime.
Panama stopped the ship in July and authorities found undeclared weaponry from Cuba -- including MiG fighter jets, anti-aircraft systems and explosives -- buried under thousands of bags of sugar.
The Cuban government said the shipment consisted of "obsolete" weapons being sent to North Korea for repairs before being returned to Cuba. But Panama said they violated United Nations arms sanctions on North Korea.
Because it is pursuing nuclear weapons, North Korea is banned by the United Nations from importing and exporting most weapons.
Earlier this month, Panamanian authorities said that North Korea would pay a fine of more than half a million dollars for the ship's release.
Authorities had originally imposed a $1 million fine on North Korea over the shipment, which they said violated the security of the canal, a key waterway linking the Atlantic and Pacific oceans.
That fine was reduced by a third to $666,666, Panama's Foreign Ministry said in a statement.
CNN's Jethro Mullen contributed to this report.