A U.S. federal appeals court upheld on Wednesday a lower court ruling that a Florida treasure-hunting firm must hand over to Spain $500 million in gold and silver coins salvaged from the bottom of the Atlantic in May 2007.

The decision by a three-judge panel of the 11th U.S. Circuit Court of Appeals in Atlanta represents a "complete victory" for Spain in the legal battle with Odyssey Marine Exploration, Inc., the attorney representing the Spanish government, James Goold, told Efe.

Odyssey asked the appellate court to overturn a December 2009 ruling by District Judge Steven D. Merryday identifying Spain as the rightful owner of the treasure.

The appellate panel "has completely rejected the arguments presented by Odyssey," Goold said.

"Everything taken by Odyssey must return to Spain," he said, while acknowledging that the Tampa-based firm could request a further review by the entire 11th Circuit.

Odyssey salvaged the coins off the Portuguese coast in the same area where the Nuestra Señora de las Mercedes, a Spanish navy frigate, was destroyed in battle in 1804.

Madrid says the treasure came from the Mercedes and that the vessel and its contents rightfully belong to Spain under the principle of sovereign immunity.

Odyssey, however, contends that contemporaneous Spanish diplomatic communications show the Mercedes was on a commercial mission at the time of her sinking, invalidating Madrid's sovereign immunity claim.