In 1970 almost every country (currently ~190 signed + Vatican, Palestine, Taiwan[1]) signed the NPT, or non-proliferation treaty. We agreed that if you didn't already have the bomb, you wouldn't get it. All but 5 countries have signed this, including North Korea, who built the bomb and then left the treaty.
The treaty outlines 5 countries that detonated a bomb before the treaty was signed. They are allowed to have bombs. These are:
- USA
- Russia
- UK
- France
- China
Other countries (4) that have bombs but did not sign:
- India
- Pakistan
- North Korea
- Israel (most likely)
- Israel is deliberately vague about whether it has the bomb, and the US is deliberately looking the other way.
South Sudan is not believed to have the bomb, but also has not signed it.
The treaty is renewed every 5 years.
The NPT non-nuclear-weapon states agree never to acquire nuclear weapons and the NPT nuclear-weapon states in exchange agree to share the benefits of peaceful nuclear technology and to pursue nuclear disarmament aimed at the ultimate elimination of their nuclear arsenals
The treaty has three arms:
- Non-proliferation (don't give anyone else the bomb)
- Disarmament (make fewer bombs; remove the ones we have)
- Use nuclear power freely (and peacefully) 😎
[1] None of these are officially recognized by the UN.