A participant in the U.S. Air Force's Man in Space Soonest and X-20 Dyna-Soar human spaceflight programs, Armstrong joined the NASA Astronaut Corps in 1962. He made his first space flight as command pilot of Gemini 8 in March 1966, becoming NASA's first civilian astronaut to fly in space. He performed the first docking of two spacecraft, with pilot David Scott. This mission was aborted after Armstrong used some of his reentry control fuel to prevent a dangerous spin caused by a stuck thruster, in the first in-flight space emergency.
Armstrong's second and last spaceflight was as commander of Apollo 11, the first manned Moon landing mission in July 1969. Armstrong and Lunar Module pilot Buzz Aldrin descended to the lunar surface and spent two and a half hours outside the spacecraft, while Michael Collins remained in lunar orbit in the Command/Service Module. Along with Collins and Aldrin, Armstrong was awarded the Presidential Medal of Freedom by President Richard Nixon. President Jimmy Carter presented Armstrong the Congressional Space Medal of Honor in 1978. Armstrong and his former crewmates received the Congressional Gold Medal in 2009.