(CNN) -- It was a mystery that Panama's president said his country was struggling to solve.
What was the massive military equipment hidden under hundreds of thousands of sacks of brown sugar on a North Korean boat? Where did it come from? And where was it going before investigators seized the vessel near the Panama Canal?
Hours after Panama said it would ask U.S. and British officials for help solving the puzzle, Cuba gave an answer Tuesday night.
In addition to 10,000 tons of sugar, Cuba's Foreign Ministry said, the shipment contained "240 metric tons of obsolete defensive weapons" sent to North Korea "to be repaired and returned to Cuba."
The equipment was manufactured in the mid-20th century and included two anti-aircraft missile systems, nine missiles in parts and spares, two MiG-21 jets and 15 motors for this type of airplane, the foreign ministry said.
"The agreements subscribed by Cuba in this field are supported by the need to maintain our defensive capacity in order to preserve national sovereignty," the statement said. "The Republic of Cuba reiterates its firm and unwavering commitment with peace, disarmament, including nuclear disarmament, and respect for international law."
Because it is pursuing nuclear weapons, North Korea is banned by the United Nations from importing and exporting most weapons.
The Cuban government's revelation, read on state television, is the latest chapter in an international drama that has all the elements of a thriller: a violent confrontation on a detained ship, missiles hidden onboard, a heart attack and an attempted suicide.
Panamanian authorities spotted the shipment during an anti-drug inspection late Monday.
Few details of the confrontation were available, but the ship's North Korean crew of 35 resisted inspection and arrest for days, said Panama's security minister, Jose Raul Mulino. He described it as "violent," saying that the crew tried to sabotage the ship by cutting cables on the cranes that would be used to unload cargo.
As it is, Mulino said, authorities now have to remove 255,000 sacks of brown sugar by hand.
During the struggle with Panamanian authorities, the ship's captain suffered an apparent heart attack and then tried to kill himself, according to President Ricardo Martinelli.
The crew also refused to raise the ship's anchor, Mulino said, forcing Panamanian authorities to cut the anchor loose to move the ship.
Panama's public ministry ordered the crew's detention, and authorities have since spoken with crew members about their travel plans. Crew members said they had left Cuba and headed toward Panama, aiming to arrive in North Korea in 51 days.
As authorities inspected the vessel, the situation was intriguing enough that Martinelli himself traveled to the ship to take a look -- with reporters in tow.
Is it a missile? a reporter asked.
"Maybe," Martinelli said. "I am not familiar with that, but it would be good if such things didn't pass through Panama, which is a country that loves peace and not war."
The president tweeted a photo of what he saw: a green octagon-shaped tube with a cone at its end and a similar-looking piece of equipment behind it.
Late Tuesday night, Mulino said the Cuban government's detailed announcement describing the military equipment had caught Panamanian officials by surprise.
Investigators have only combed through one of the ship's five compartments, he said. They are asking the United States and the United Kingdom to send teams to help them identify the weapons, and will invite a special commission from the United Nations to determine whether the shipment violates the organization's North Korea weapons ban.
Even with many unanswered questions, Mulino said, the Cuban government's statement explains one thing.
"Now we clearly understand the suicidal attitude of the captain," he said, "and the rebellion and the rioting of the crew."
U.N. official: 'We are following it closely'
Earlier Tuesday, a spokeswoman for the U.N. secretary-general said Panama had not officially reported the incident to the United Nations. If that happens, a U.N. panel of experts would review the incident.
"If it is confirmed that the vessel was carrying arms or related materiel and that the shipment was part of a purchase or sale to or from the Democratic People's Republic of Korea, then there would indeed be a breach of the U.N. sanctions regime relating to that country," spokeswoman Morana Song said.
Members of the U.N.'s North Korea sanctions committee have seen media reports about the boat and are awaiting a formal notification with details from Panama.
"We are following it closely," said Jacques Flies, a spokesman for Luxembourg Ambassador Sylvie Lucas, who chairs the committee.
Authorities seized the vessel and the undeclared haul in the Panamanian port of Manzanillo.
U.S. officials say they tracked ship
Investigators spotted the boat going through the Panama Canal to Havana and then back toward the canal, according to two senior U.S. officials who said the United States had been tracking the ship along with the Panamanians for some time.
Another senior U.S. official said the United States had been tracking the ship for several days and knew that Panamanian authorities were going to stop it.
State Department spokesman Patrick Ventrell declined to describe U.S. interactions with Panama concerning the ship, but noted that the vessel has a checkered past connected with drug smuggling.
"Public reports from 2010 and also a U.N. panel of experts report from 2012 cite this history," he said Tuesday. "So this vessel has a well-known history in this regard."
Concerns over Cuba
Cuban state media reported late last month that North Korean army Chief of Staff Gen. Kim Kyok Sik visited the island and had high-level meetings, including one with Cuban leader Raul Castro.
In the United States, Rep. Ileana Ros-Lehtinen, R-Florida, described this week's incident as "serious and alarming" and a "wake-up call" for the Obama administration to avoid normalizing U.S. relations with Cuba.
Some analysts described the situation as a troubling sign that North Korea could be supplying Cuba with weapons.
"This is a country which is just 90 miles away from American shores," Forbes.com columnist Gordon Chang told CNN's "Erin Burnett: OutFront."
"Now, if they can smuggle missile radar into Cuba, you know, God knows what else they can put there. We do not need a replay of the Cuban missile crisis, this time with the North Koreans' fingers on the triggers instead of the Soviets."
Chang, author of "Nuclear Showdown: North Korea Takes On the World," said the Panamanian president's dramatic description of how the ship's crew members handled the incident didn't surprise him.
"They do not want anybody on their ships," he said. "Whether it's carrying melons or nuclear technology, the North Koreans would act pretty much the same way."
A history of weapons shipments
This isn't the first time North Korea has been linked to shipping suspected of transporting weapons materials.
In 2011, the U.S. Navy tried -- and failed -- to gain permission to board a ship in the South China Sea suspected of carrying illicit weapons technology to Myanmar, the Pentagon said. The Belize-flagged MV Light was believed to have been manned by a North Korean crew, the Pentagon said. Under U.S. Navy surveillance, the vessel eventually turned around and headed to North Korea.
In 2007, the Pentagon confirmed that several shipments of suspected weapons technology had left North Korea destined for Syria. The Pentagon said some of the material was believed to have been high-grade metals that could be used to build missiles or solid-fuel rockets.
CNN reported in 2011 that an unpublished U.N. report claimed North Korea was trading banned weapons technology with several countries, including Iran.
CNN's Mariano Castillo and Catherine E. Shoichet wrote this story in Atlanta. CNN's Patrick Oppmann reported from Cuba; journalist Castalia Pascual reported from Panama; CNN's Adam Levine, Elise Labott and Barbara Starr contributed from Washington; and CNN's Fernando del Rincon, Kevin Wang, David Simpson and Thom Patterson contributed to this report from Atlanta.