Delegates in Geneva approved measures to control the use of the highly toxic metal in order to reduce the amount of mercury released into the environment.More than 140 countries have agreed on a set of legally binding measures to curb mercury pollution, at UN talks.
Mercury can produce a range of adverse human health effects, including permanent damage to the nervous system.
The UN recently published data that showed mercury emissions were rising in a number of developing nations.
The deal was agreed after all-night talks.
UN Environment Programme (Unep) spokesman Nick Nuttall told Reuters: "A treaty to start to begin to rid the world of a notorious health-hazardous metal was agreed in the morning of Jan 19."
The rules, known as the Minamata Convention and named after the Japanese town that experienced one of the world's worst cases of mercury poisoning, will open for nations to sign at a diplomatic conference later this year.
The convention will regulate a range of areas, including:
- the supply of and trade in mercury;
- the use of mercury in products and industrial processes;
- the measures to be taken to reduce emissions from artisanal and small-scale gold mining;
- the measures to be taken to reduce emissions from power plants and metals production facilities.
Ahead of the five-day meeting, the UN Environment Programme (Unep) published a report warning that developing nations were facing growing health and environmental risks from increased exposure to mercury.
It said a growth in small-scale mining and coal burning were the main reasons for the rise in emissions.
As a result of rapid industrialisation, South-East Asia was the largest regional emitter and accounted for almost half of the element's annual global emissions.
Mercury - a heavy, silvery white metal - is a liquid at room temperature and can evaporate easily. Within the environment, it is found in cinnabar deposits. It is also found in natural forms in a range of other rocks, including limestone and coal.
Once emitted, it persists in the environment for a long time - circulating through air, water, soil and living organisms - and can be dispersed over vast distances.Mercury can be released into the environment through a number of industrial processes including mining, metal and cement production, and the burning of fossil fuels.
The World Health Organization (WHO) says: "Mercury is highly toxic to human health, posing a particular threat to the development of the (unborn) child and early in life.
"The inhalation of mercury vapour can produce harmful effects on the nervous, digestive and immune systems, lungs and kidneys, and may be fatal.
"The inorganic salts of mercury are corrosive to the skin, eyes and gastrointestinal tract, and may induce kidney toxicity if ingested."
The Unep assessment said the concentration of mercury in the top 100m of the world's oceans had doubled over the past century, and estimated that 260 tonnes of the toxic metal had made their way from soil into rivers and lakes.
Another characteristic, it added, was that mercury became more concentrated as it moved up the food chain, reaching its highest levels in predator fish that could be consumed by humans.