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 included data 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.
"However, there are now filling materials that perform better, and which have the benefit of not containing mercury," he said.
He believed the end of the use of dental amalgam is approaching sooner rather than later.
But Broadbent said that doesn't mean people should rush out an get their old fillings replaced.