MADRID — A Spanish court has shelved a lawsuit against American treasure hunters that accused them of having destroyed an underwater archaeological site when they looted a sunken galleon for tons of precious coins over a decade ago.

In 2007, the Florida-based Odyssey Marine Exploration scooped up over half a million silver and gold coins from the bottom of the Atlantic Ocean when it discovered a sunken Spanish galleon. Spain disputed the company’s claim to the treasure, which was worth an estimated $500 million. Following a five-year legal battle in U.S. courts, Odyssey had to return the treasure to Spain in 2012.

A separate case on whether the Odyssey had committed a crime by allegedly destroying the underwater site where it found the Nuestra Senora de las Mercedes ship was tossed out in 2016. Now, another court has said that an appeal by Spanish archaeologists against that decision has been thrown out as well. This decision is not open to appeal.

In court documents seen by Associated Press on Tuesday, the panel of three judges presiding over the court in the southern city of Cadiz said the five-year statue of limitations for the alleged crime had already passed. But they also complained that a 2013 request made to the United States for the owners of Odyssey to be questioned in the case was never heeded.

“Even though we share our surprise, puzzlement, and even anger, for what we can only call the unprecedented course of this case, it would be senseless to let it go on if we consider the statue of limitation,” the judges wrote.

The Mercedes galleon was sunk by British ships near the Strait of Gibraltar in 1804. It was transporting silver and gold coins that were mined and minted in the Andes.