Cadbury has withdrawn an advertising campaign urging children to dig for treasure after archaeologists said it encouraged people to break the law.
The campaign on its website called on children to "grab a metal detector" and dig holes looking for gold or treasure.
Dr Aisling Tierney, of Bristol University, said it was "intensely stupid" and people could be prosecuted for digging without permission.
Cadbury confirmed it had removed the campaign web page.
Dr Tierney welcomed the U-turn, but said Cadbury "is sorely lacking in understanding the gravity of the problem".
"They have grasped that their content promoted 'breaking the rules' but actually, it was the rule of law."
She said she hoped the company "learns from this experience and take the opportunity to develop something better that will respect heritage".
Historic England said: "There are strict rules that protect England's archaeological heritage, including laws governing use of metal detectors.
"We are glad to see the campaign website is no longer live, and would be happy to advise Cadbury to make sure any future campaign doesn't have unwelcome results."
Cadbury said the campaign was aimed at inspiring families "to go on everyday adventures together".
It said: "It was not our intention to encourage anyone to break existing regulations regarding the discovery of new archaeological artefacts and we are grateful this matter has been brought to our attention.
"We can now confirm that the webpage has been taken down and we are updating the content to focus solely on directing families to museums where existing treasures can be found."
You may also like:
This is not the first time Cadbury has come up against criticism for its adverts.
In April 2017, Cadbury and the National Trust decided to drop the word Easter from the Cadbury Egg Hunt event after the Archbishop of York said the name of the event was like "spitting on the grave" of the firm's Christian founder, John Cadbury.
Cadbury said at the time Easter was referred to on much of its packaging and marketing.
The National Trust also denied it was downplaying the significance of Easter.