Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — Legendary astronaut John Young, who walked on the moon and later commanded the first space shuttle flight, has died, according to a statement from NASA. Young was 87.

The space agency said Young died Friday night at his home in Houston following complications from pneumonia.

Astronaut John Young, who walked on the Moon on April 21, 1972, during the Apollo 16 mission, photographed on May 12, 2009. - / AFP - Getty Images

Young was the only agency astronaut to go into space as part of the Gemini, Apollo and space shuttle programs, and the first to fly into space six times. He was the ninth man to walk on the moon.

Related: The Making of an Astronaut

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Young was in NASA's second astronaut class, chosen in 1962, along with the likes of Neil Armstrong, Pete Conrad and James Lovell.

"Today, NASA and the world have lost a pioneer. Astronaut John Young's storied career spanned three generations of spaceflight," NASA administrator Robert Lightfoot said in an emailed statement Saturday.

"John was one of that group of early space pioneers whose bravery and commitment sparked our nation's first great achievements in space," he added.

Astronaut John Young aboard Gemini III waiting for the launching of the first orbital maneuver by manned spacecraft on March 23, 1965. - / AFP - Getty Images

Counting his takeoff from the moon in 1972 as commander of Apollo 16, Young's blastoff tally stood at seven, for decades a world record.

He flew twice during the two-man Gemini missions of the mid-1960s, twice to the moon during NASA's Apollo program, and twice more aboard the new space shuttle Columbia in the early 1980s.

Young spent his last 17 years at NASA's Johnson Space Center in Houston in management, focusing on safety issues. He retired at the end of 2004.

Related: Space Travel Up Close and Behind the Scenes

Former President George H. W. Bush was among those offering condolences to Young's family.

Bush said in a statement that he and wife Barbara "join our fellow Americans and many friends in the space community in mourning the loss."

"John was more than a good friend; he was a fearless patriot whose courage and commitment to duty helped our Nation push back the horizon of discovery at a critical time," Bush said. "To us, he represented the best in the American spirit — always looking forward, always reaching higher."