Three British divers accused of stealing sunken treasure from a shipwreck off Spain's northwest coast have avoided trial after prosecutors accepted a plea bargain Tuesday, authorities said.

The sentence and details of the plea agreement will not be announced until Wednesday. But court officials said the three avoided a trial by accepting the deal.

The divers are from Cornwall, England, and they were identified as Peter Michael Devlin, Steve Paul Russ and Malcolm Gordon Cubin.

The trio was accused of stealing valuables believed to include gold and diamonds during a dive off the northwest Spanish region of Galicia.

They had faced charges of theft and violating Spanish cultural heritage laws. They were arrested in May 2002, freed on bail and allowed to return to England.

All three commercial divers had been working for a Falmouth, England-based dive company called Force 9 Salvage, which claimed to have permits to explore a sunken Dutch 19th century vessel called the Friesland.

Prosecutors said they also searched the Don Pedro, a wreck reputed to have been laden with gold and diamonds.

The men initially denied all charges, which could have carried six-year prison terms had the case gone to trial.