Children's jewellery and school supplies containing toxic levels of lead and cadmium will no longer be sold via Amazon in the US.
The retailer has acted after a US federal investigation found "dozens" of products for sale containing illegal levels of the metals.
One product had up to 80 times the recommended amount of lead in it.
Amazon has also paid a $700,000 (£538,000) fine that will be used to police products aimed at children.
"As a parent, when I buy products for my kids, I expect them to be safe," said Bob Ferguson, attorney general for Washington state, whose office carried out the investigation in early 2019.
Products probed by the attorney general's office included jewellery for children as well as school supplies such as pencil cases, backpacks, book covers and lunch boxes.
Many of the items containing high levels of the metals featured "cartoon characters, plush exteriors and bright primary colours and were marketed to children younger than 12", said Mr Ferguson's office in a statement.
As part of its deal with the attorney general, Amazon has pledged to change the way it sources these types of products. In the future it will only let merchants sell goods if they have provided certificates from testing labs proving they are safe.
Approximately 18,000 sellers who use Amazon as a shop front will be affected by the improved testing regime.
The attorney general also told Amazon to contact buyers of dangerous products and ask them to dispose of the items. This led to Amazon issuing more than $200,000 in refunds to customers who bought the toxic goods.
Another stipulation of the agreement demands that if the attorney general's investigators find toxic products on sale via Amazon, the retailer must remove the goods within two business days.
In a statement, Amazon said customer safety was its "top priority".
It added: "We work closely with our selling partners to verify that the school supplies and children's jewellery in our store are safe, and drive continuous improvement to our processes to verify the safety of these products."
UK rules would not let sellers offer toxic products via Amazon, said a spokeswoman for the Office of Product Safety and Standards.
"The government's top priority is to keep people safe and Britain's product safety requirements are among the highest in the world.
"Our tough rules allow manufacturers to only put safe products on the market and it is their responsibility to take action, including recalls, if they discover any safety issues," said the spokeswoman.