The study, published in the journal Operative Dentistry, found the use of mercury-containing amalgam dropped from just over 50 percent of fillings in 1998, to just 7 percent in 2017.
There was a corresponding increase in the use of tooth-coloured filling materials.
The study also includeddata from a national survey of dental practitioners, which showed 64 percent preferred using composite resin fillings, while just 13 percent preferred amalgam.
Study lead author Associate Professor Jonathan Broadbent said mercury is an environmental hazard, so by extension, dental amalgam is too.
"Teeth with amalgam fillings in them are classified by the New Zealand Dental Council as hazardous waste and, if disposed of incorrectly, they can contaminate the environment," he said.
"[The Otago University dental school] has already stopped putting any amalgam in baby teeth. My view is that it is time to stop doing it to all teeth."
Broadbent said amalgam has allowed people to keep teeth that otherwise could not have been saved, because it used to be the only real option available.