In May 1961, as the US was recovering from the Bay of Pigs fiasco, JFK decided to take the nation’s mind off nuclear Armageddon and instead focus on the heavens. In a speech before both houses of Congress, he asked them to commit the country to the goal “before this decade is out, of landing a man on the moon and returning him safely to the earth”.
The Mercury program had been started under the previous administration, but it was not until earlier in that May that the first American, Alan Shepard, made a successful suborbital flight.
As the US began to overtake the USSR in the Space Race, thoughts turned to where man would go after the moon had been reached; it was then realized that there were no studies on how the crew would cope with long-term confinement in tight confines while breathing an artificial atmosphere.
In order to examine this problem, the US Navy devised a program called SEALAB; teams of US Navy divers and later astronauts were ensconced in experimental underwater habitats, moored to the seabed.