MIAMI  - Tons of gold and silver from a Spanish ship that sunk in 1804 and was discovered by a US deep sea exploration company was on its way to Spain on Friday aboard two military transport planes.

The transfer ends a five-year legal battle between Florida-based Odyssey Marine Exploration, Inc and Spain over treasure from the sunken frigate “Nuestra Senora de las Mercedes,” the most valuable sunken treasure discovery in history.

“The total was 49,000 pounds, much more than the 17 tons thought at first, because the first quantity the company announced was not correct,” Miguel Morer, press spokesman for the Spanish Defense Ministry, told AFP.

British warships sunk the Spanish ship off the coast of Portugal near the Straits of Gibraltar during the Battle of Cape Santa Maria in October 1804. Odyssey discovered the shipwreck in May 2007 and shipped the treasure to the United States without notifying any government authorities.

The company stored the roughly $500 million worth of coins and artifacts at a warehouse in its hometown of Tampa. The two Spanish Hercules transport planes departed MacDill Air Force Base in Tampa overnight Thursday to Friday carrying the treasure. The flight includes refueling stops in New Jersey and Canada before flying to Spain’s Torrejon Air Base near Madrid for a landing around noon Saturday.