The North Korean crew and ship detained in Panama for smuggling Cuban weapons three months ago will soon be freed.

The crew's return would mark the end of a bizarre chapter between the three countries that provoked international controversy after the ship was seized in July for smuggling military-style arms under more than 10,000 tonnes of sugar.

Foreign Minister Fernando Nunez said repairs to the ship were nearly completed so the crew could sail back home in the same vessel.

While the UN Security Council has yet to decide on penalties against Cuba, given a ban against arms transfers to North Korea due to the country's nuclear weapons programme, the arms would probably be sold or given away, Nunez Fabrega added.

In July, the North Korean crew sabotaged its electrical system and bilge pumps after Panamanian investigators stopped the ship on suspicion it was carrying drugs after leaving Cuba.

The North Korean-flagged ship will be returned after the vessel's owner formally signs off on the plan.

Meanwhile, 33 of the 35 crew members, held at a former US army base on charges of threatening Panama's security, "appear to be ignorant of what was in the cargo", Nunez Fabrega said. "As a result, if the attorney general determines they are not criminally responsible, they cannot be prosecuted."

Both the captain, who tried to slit his throat after Panamanian investigators seized the ship, and his deputy consistently refused to give statements during their detention. As a result, they might still face trial.

The crew refused efforts to put them in contact with their families, Nunez Fabrega said.

"Their families in North Korea must think they sank with the boat," he said.

After the arms were discovered on board the vessel Chon Chong Gang, the Cuban government said it had been sending "obsolete" Soviet-era weapons, including fighter jets and missiles, to be repaired in North Korea and then returned.

This article appeared in the South China Morning Post print edition as N. Korean arms ship crew can go home