MIAMI — The Spanish galleon San José was overloaded with 200 passengers and 700 tons of cargo on a summer night in 1631 when it smashed into a rock off the Pacific coast of Panama, spilling silver coins and bars into the Gulf of Panama. More than 400,000 coins and at least 1,417 bars were lost over a 40-mile trail.

Four hundred years later, that shipwreck has become one of the latest to land in a legal quagmire over who should have the rights to historic artifacts trapped under the sea. This one involves the United Nations, the United States Department of Homeland Security, the government of Panama and Americans accused of being pirates. At issue is whether private companies should be able to claim and profit from historic treasures.

Those questions are of particular interest to businesses in South Florida at a time when technology is making it easier to find and recover sunken loot. The National Oceanic and Atmospheric Administration estimates that there are over 1,000 shipwrecks in the Florida Keys alone.

In the case of the San José booty, commercial treasure hunters, financed in part by an adventure entrepreneur who runs tours to the Titanic, spent over $2 million and 10 years recovering portions of the treasure, only to see their permits questioned and bounty confiscated.