The UN General Assembly has adopted a historic treaty to control the trade in conventional arms, voting it through by a huge majority.
Member-states voted by 154 votes to three, with 23 abstentions, to control a trade worth $70bn (£46bn) annually.
The treaty went to a vote after Syria, Iran and North Korea blocked its adoption by consensus.
Russia and China, some of the world's biggest exporters, were among those who abstained from the vote in New York.
The treaty prohibits states from exporting conventional weapons in violation of arms embargoes, or weapons that would be used for acts of genocide, crimes against humanity, war crimes or terrorism.
It also requires states to prevent conventional weapons reaching the black market.
Washington welcomed the move, with Secretary of State John Kerry describing the treaty as "strong, effective, and implementable".
He said the document "can strengthen global security while protecting the sovereign right of states to conduct legitimate arms trade".
British Foreign Secretary William Hague said: "This is an historic day and a major achievement for the United Nations.
"The world wanted this treaty and would not be thwarted by the few who sought to prevent the introduction of robust, effective and legally-binding controls on the international trade in weapons."
Amnesty International tweeted: "We did it! The world has been waiting a long time for this historic #ArmsTreaty...and now we have it."
Before the vote, Australia's ambassador to the UN, Peter Woolcott, had said the final draft of the treaty was a compromise text to bring together the broadest range of stakeholders.
"We owe it to those millions - often the most vulnerable in society - whose lives have been overshadowed by the irresponsible and illicit international trade in arms,'' he said.
But Russia's Vitaly Churkin described as a significant shortcoming the lack of a clause in the draft treaty about banning the supply of weapons to non-state entities.
The assembly had heard from member-states' ambassadors objecting to, or supporting, the draft.
Syria's Bashar Jaafari said his country did not object to regulating the international arms trade, but opposed the draft because it did not refer to the arming of "non-state terrorist groups".
Some of the countries behind the draft treaty, he said, were "fully engaged in supplying terrorist groups [in Syria] with all kinds of lethal weapons".
The BBC's Paul Adams, in Washington, says the Syrian government, which depends on arms imports from Russia and Iran, is clearly worried about its ability to continue fighting its civil war.
Cuba's Rodolfo Reyes Rodriguez said his country would abstain from the vote, saying the draft contained "ambiguities" which gave it "serious limitations" and that it favoured the interests of arms exporters.
But proposing the draft, Costa Rica's Eduardo Ulibarri said the treaty showed the UN was an "indispensable organisation in the 21st Century".
Diplomats have worked for nearly a decade to agree on a set of principles to control the flow of such arms.
Attempts to agree the treaty last year broke down after the US, followed by Russia and China, said they needed more time to consider the issues.
Last week, a UN treaty-drafting conference failed to reach consensus after objections from Syria, Iran and North Korea.
Iran said the treaty was full of flaws and loopholes and North Korea said it was unbalanced.
The draft was then sent to UN Secretary-General Ban Ki-moon who was asked on behalf of nations backing the treaty to put it to a vote in the General Assembly on Tuesday.
In the US, the biggest pro-gun lobby group, the National Rifle Association, has vowed to fight against ratification of the treaty by the Senate, although the UN says the treaty does nothing to interfere with domestic firearms legislation.