United Nations Secretary General Antonio Guterres addresses the 72nd United Nations General Assembly at U.N. headquarters in New York, U.S., September 19, 2017. REUTERS/Lucas Jackson

UNITED NATIONS (Reuters) - Dozens of countries signed a treaty to ban nuclear weapons on Wednesday amid tensions over North Korea’s nuclear and missile tests, although the United States, Britain, France and others boycotted the event at the annual United Nations gathering of world leaders.

The treaty on the prohibition of nuclear weapons will enter into force 90 days after 50 countries have ratified it. Only a few states were due to deposit their ratification on Wednesday.

“There remain some fifteen thousand nuclear weapons in existence. We cannot allow these doomsday weapons to endanger our world and our children’s future,” U.N. Secretary-General Antonio Guterres said as he opened the treaty for signing.

Earlier this month North Korea conducted its sixth and largest nuclear weapons test. U.S. President Donald Trump told the 193-member U.N. General Assembly on Tuesday that if threatened, the United States would “totally destroy” the country of 26 million people and mocked its leader, Kim Jong Un, as a “rocket man.”

The treaty was adopted in July by two-thirds of the 193 U.N. member states after months of talks, which the United States, Britain, France and others skipped. They instead pledged commitment to a decades-old Non-Proliferation Treaty, which aims to prevent the spread of nuclear weapons and weapons technology.

The United States, Britain and France are among nine countries believed to have nuclear weapons.