A) in order to install nuclear weapons in space
B) to shift the focus away from his domestic policy failures
C) to fulfill his campaign promise to put a man on the moon
D) to bolster the nation's prestige and power in the face of several foreign policy setbacks
Of these options, the best answer is D. Most historians argue that JFK made the commitment to put a man on the moon within the decade in an attempt to bolster the nation's prestige after the Soviet Union had managed to send a man into space.
JFK had not made any campaign promises about putting men in space. However, in April of 1961, the Soviets succeeded in putting Yuri Gagarin into orbit. This, like the launch of Sputnik in 1957 reduced US prestige. This was because it made it seem as if the Soviets were pulling ahead in technology. Not much more than a month later, JFK promised that the US would put a man on the moon. Historians believe that he did this to regain prestige for the US.