The 10-year deal is aimed at denying militants potential access to nuclear and chemical weapons materials.
Ex-Soviet arsenal
150-200 tons of weapons-grade plutonium
7-800 tons of weapons-grade uranium
Estimated 16,000 stored nuclear weapons, including nuclear landmines and shells
It was finalised at a one-to-one meeting between US President George W Bush and his Russian counterpart Vladimir Putin at the G8 Summit in Kananaskis, Canada.
A statement announced the formation of a "global partnership against the spread of weapons and materials of mass destruction".
Mr Bush described Mr Putin as a "strong ally in the war against terror".
"His actions speak louder than his words," he said.
Mr Putin said for his part that joint efforts were essential if the fight against terror was to succeed.
Wide reach
Russia will be the initial focus of attempts to stop proliferation and address nuclear safety issues, but help may be extended to other former Soviet states.
The aid will go towards decommissioning weapons, safeguarding nuclear and biological stockpiles, securing nuclear reactors and, particularly, keeping dangerous materials away from militants.
The statement said priority concerns were to:
The US will raise up to $10bn over 10 years and the other $10bn will be contributed jointly by Britain, Canada, France, Germany, Italy and Japan.
The money may come in the form of debt relief as well as grants.
Although making large-scale nuclear weapons requires a high degree of expertise, there are fears that militants could scrape together sufficient supplies of radioactive material to produce a small, crude, yet devastating bomb.
The leaders said the 11 September attacks had shown that militants were "prepared to use any means to cause terror and inflict appalling casualties on innocent people".
So-called dirty bombs could be manufactured by simply wrapping small amounts of radioactive material in conventional explosives.
The plan had been revealed on the first day of the G8 Summit, but there was plenty of last-minute negotiating on the final details.