(CNN) Former astronaut John Young, a NASA trailblazer whose six journeys into space included a walk on the moon and commanding the first space shuttle flight, died Friday after complications from pneumonia, NASA said Saturday.

He was 87.

"NASA and the world have lost a pioneer. Astronaut John Young's storied career spanned three generations of spaceflight; we will stand on his shoulders as we look toward the next human frontier," NASA Administrator Robert Lightfoot said.

Young, a former Navy pilot, was part of the second group of astronauts the space agency hired, brought aboard in 1962 to add to the original Mercury Seven who'd been selected three years earlier.

He ended up as one of NASA's most experienced flyers, becoming the first astronaut to fly into space six times, and the only one to enter space in each of the Gemini, Apollo and space shuttle programs.

"I was just lucky enough to be in the right place at the right time, and to get the opportunity to do it," he told the Orlando Sentinel in 2004. "It's not extraordinary at all -- anybody could have done it, I'm sure. You've just got to hang in there."

He was part of the first manned Gemini mission -- with Gus Grissom on Gemini 3 in 1965. According to media reports, Young smuggled a corned beef sandwich in his spacesuit, a move that didn't sit well with NASA staff in Houston who worried about the crumbs.

And he commanded the first space shuttle flight, with pilot Bob Crippen, over three days in April 1981.

"We were testing stuff out and making sure the payload bay doors worked right and checking to make sure the radiator deployed and stuff like that to make sure we'd operate OK on orbit," Young told CNN in 2011. Then he added: "Everything worked, that was the amazing part ... especially on re-entry when we didn't get burned up."

Young flew to the moon twice and landed on it once. He was part of the Apollo 10 crew that orbited the moon in May 1969 in preparation for the first landing later that year. In the second trip, Young walked on the moon as part of Apollo 16 in 1972.

"John Young was at the forefront of human space exploration with his poise, talent, and tenacity," Lightfoot said. "He was in every way the 'astronaut's astronaut.' We will miss him."

Former shuttle commander Scott Kelly also said Young was "the astronauts' astronaut" and a "true legend."

Former President George H.W. Bush said Young 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."

"Barbara and I join our fellow Americans and many friends in the space community in mourning the loss of astronaut John Young," Bush said in a statement. "To us, he represented the best in the American spirit -- always looking forward, always reaching higher.

"John leaves a tremendous legacy of accomplishment, in addition to his wonderful family. May his memory serve to inspire future generations of explorers to dare greatly, act boldly, and serve selflessly."

Young was born in San Francisco and grew up in Orlando. He was graduated from the Georgia Institute of Technology in 1952 with a degree in aeronautical engineering.

He joined the Navy, serving on a destroyer before becoming a pilot in 1959. Three years later he was selected as a NASA astronaut. He spent 835 hours in space, NASA said. He served as chief astronaut from January 1974 until May 1987. He retired at the end of 2004.