The longest serving astronaut in history, who flew twice to the moon and commanded the first space shuttle mission, has announced his retirement after 42 years at NASA.

John W. Young (search), 74, announced Tuesday his plans to leave the space agency on Dec. 31.

Young was the first human to fly in space six times and the only astronaut to pilot four different spacecraft. He flew in the Gemini, Apollo and space shuttle programs.

"John's tenacity and dedication are matched only by his humility," said NASA Administrator Sean O'Keefe (search). "He's never sought fame and often goes out of his way to avoid the limelight."

Young joined NASA in 1962. His first mission was in 1965 as a pilot of the first manned flight of the Gemini program. He went on to command the Gemini 10 in 1966, followed by his orbit of the moon in the Apollo Command Module (search) in 1969.

Young went back to the moon in 1972, when he and another astronaut collected more than 200 pounds of lunar samples.

"John has an incredible engineering mind, and he sets the gold standard when it comes to asking the really tough questions," said William Readdy, NASA's associate administrator for space operations. "When he talks, everybody listens."

In 1981, Young commanded Columbia during the first space shuttle mission. His final space mission came in 1983, when he again commanded Columbia.

"John Young has no equal in his service to our country and to humanity's quest for space," said Jefferson D. Howell Jr., director of the Johnson Space Center (search), where Young was an associate director for eight years. "He is the astronaut's astronaut, a hero among heroes who fly in space."