The North Korean ship seized with undeclared Cuban weapons on board is returning to Cuba, says the Panamanian government.
The Panama Canal Authority recently said the ship could leave, after Pyongyang paid a nearly $700,000 (£425,000) fine.
The ship was seized seven months ago with Soviet-era weapons and fighter jets hidden under sacks of sugar.
Three members of the crew stayed behind to face arms trafficking charges.
The captain, the first officer and the political officer of the Chong Chon Gang face sentences of up to 12 years.
The other 32 crew members were released without charge.
Panama's Foreign Ministry said the ship set off on Saturday morning.
United Nations sanctions ban any country from providing arms to North Korea.
The container ship was stopped near Manzanillo, on the Atlantic side of the canal, on 15 July under suspicion that it was carrying drugs.
It had disappeared from satellite tracking for a few days as it approached the Cuban capital, Havana, having departed from Russia's eastern coast three months earlier.
On searching the vessel, officials found military hardware including two Soviet-era MiG-21 fighter aircraft, air defence systems, missiles and command and control vehicles.
Cuban authorities said that the ship was carrying 240 tonnes of "obsolete" defensive weapons.
The North Korean government insisted the ageing weapons were simply being transferred to North Korea to be repaired, before returning them.
Panamanian officials quoted by Reuters news agency said the arms would probably be sold or given away and the sugar sold to companies interested in turning it into ethanol.