Florida deep-sea explorers who raised an estimated $500 million treasure from the 200-year-old wreck of a Spanish galleon should give all the loot back to Spain, a federal magistrate judge said.

But the two-year tug-of-war over the 17 tons of silver coins and other artifacts from what is believed to be the Nuestra Senora de las Mercedes y las Animas is likely far from over.

Odyssey Marine Exploration said it will oppose Wednesday's written recommendation by U.S. Magistrate Judge Mark Pizzo, which will be considered by another federal judge who will issue an order later.

Odyssey CEO Greg Stemm said Thursday the company is prepared to keep fighting.

"This case addresses some very significant legal issues, so in the beginning it became fairly clear it was going to go to the appellate court level," Stemm said.

Pizzo's written recommendation said the wreck is almost certainly that of the Mercedes, a navy galleon that sank in the Atlantic Ocean west of Portugal in 1804. He accepted the Spanish government's argument that it had never expressly surrendered ownership of the ship and its contents.

Odyssey has argued that it still lacks conclusive proof of the ship's identity and disputed the Spanish government's ownership of the valuable cargo.

"We are very happy," Spanish Culture Minister Angeles Gonzalez-Sinde told reporters Thursday. "This decision is very important. I am glad the judge has really seen that the ship and the treasure belong to Spain."

She said the ruling sets "a very important precedent for all future underwater finds."

Odyssey created an international stir when it announced in May 2007 that the 500,000 silver coins and other artifacts had been raised from an Atlantic Ocean wreck and flown back to Tampa. Spain then went to U.S. District Court claiming ownership of the treasure if it is in any way connected to the country's national heritage.

Peru also has filed a claim, arguing that the Spanish coins being carried by the Mercedes might have been minted in Lima. Twenty-five descendants of merchants who were transporting cargo on the ship also want a piece.

Some in the Spanish government have called the publicly traded company's employees 21st century pirates, and twice in the months after the 2007 announcement, ships from Spain's Civil Guard seized Odyssey ships off the Spanish coast. Both ships and their crews were released within a week.

The company's relationship with the British government has been more cordial. Odyssey had already negotiated an agreement with British officials regarding the search for the HMS Sussex, which sank in the western Mediterranean in 1694 with gold coins aboard and has never been found.

Pizzo's report indicates that he solidly supports Spain's position, noting that the graves of the 200 people who perished when the Mercedes exploded in battle and sank were undisturbed for more than two centuries before Odyssey discovered the wreck in 3,600 feet (1,100 meters) of water.

"International law recognizes the solemnity of their memorial, and Spain's sovereign interests in preserving it," Pizzo wrote. "This court's adherence to those principles promotes reciprocal respect for our nation's dead at sea."

Odyssey uses sonar equipment and a sophisticated remote-controlled robot to find and excavate shipwrecks in deep water. The first big strike for the publicly traded company came in 2003 with the discovery of a Civil War-era steamer off the Georgia coast that yielded 51,000 gold coins and other artifacts valued at around $70 million.

In February, the company announced the discovery of the HMS Victory, a legendary British man-of-war that sank in the English Channel 264 years ago. Odyssey said it is looking for the 4 tons of gold coins that might have been aboard when it sank.

The discovery of the Mercedes in 2007 generated headlines worldwide. Odyssey subsequently partnered with Disney to help promote a pirate movie. The company's work is also featured in the Discovery Channel series "Treasure Quest."