On August 5th, 1963, the Limited Nuclear Test Ban Treaty was signed in Moscow by the United States, United Kingdom, and Soviet Union, banning atmospheric, underwater and outer-space nuclear tests a day before the 18th anniversary of the atomic bombing of Hiroshima.
The proliferation of nuclear testing following the end of World War II and the beginning of the Cold War was followed by public concerns around radioactive fallout, and the potential for new nations to proliferate. John F. Kennedy believed a test ban would be an effective first step towards eventual disarmament, and made it a part of his 1960 campaign for President.
However once elected, Kennedy’s administration came to believe the Soviet’s had continued underground tests in secret, and despite an informal moratorium on testing between the two countries and continued meetings with Soviet Premier Khrushchev, by August 1961 the Soviet Union had re-started atmospheric nuclear tests. With little diplomatic progress, the US resumed testing by April, 1962.
It would take the Cuban Missile Crisis, bringing both states to the brink of nuclear war, for both Kennedy and Khrushchev to confront the dangers of continued testing and find the resolve to agree on a solution.
After twelve days of negotiation, both sides had agreed to the limits of the ban, excluding underground testing and sparing the Soviet’s from having to face intrusive checks on their nuclear facilities that may have revealed the extent to which they were trailing the US.
Following the signing on August 5th, Kennedy went on to convince the US public and Senate that the treaty was in the country’s best interests, and he was able to ratify the treaty on October 7th, 1963.
Sources: https://www.jfklibrary.org/learn/about-jfk/jfk-in-history/nuclear-test-ban-treaty