(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 arrest, 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.
Speculation surges over find
A defense analysis website identified the photo as radar equipment for a surface-to-air missile system.
As of Tuesday, Panamanian authorities had not identified the military equipment or its country of origin, Mulino said. Those details would not be known until all the sugar was unloaded and the objects removed from the ship.
Martinelli said he didn't examine all the containers but assumed that there was similar military equipment in the others, hidden under the sugar.
Military analyst IHS Jane's released a statement Tuesday identifying the equipment shown in the photos as "fire control" radar equipment for surface-to-air missiles.
Jane's proposed two theories about why the equipment was on board the ship. "One possibility is that Cuba could be sending the system to North Korea for an upgrade. In this case, it would likely be returned to Cuba and the cargo of sugar could be a payment for the services," the statement said.
Jane's other theory was that "the fire-control radar equipment could have been en route to North Korea to augment Pyongyang's existing air defense network. North Korea's air defense network is arguably one of the densest in the world, but it is also based on obsolete weapons, missiles and radars."
U.S. officials also said they were looking at the possibility that Cuba was sending radar for surface-to-air missiles back to North Korea for an upgrade. The officials said the radar, which tracks targets for the missiles, is believed to be the major piece of military equipment on board the North Korean freighter.
Panama to reach out to U.N.
Panama said it will ask a United Nations technical support team to inspect the cargo to determine what type of weaponry it is.
"Honestly, this kind of military equipment can't go through the country while declaring that it is something else, especially hiding it as you can see here," Martinelli said. "We will continue to empty the entire ship to see what's in it, and the relevant authorities will determine what exactly is on this ship."
Panama has not officially reported the incident to the United Nations, a spokeswoman for the U.N. secretary-general said. 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.