Legendary astronaut John Young -- who twice ventured into space in pioneering two-man Gemini capsules, orbited the moon and then walked on its cratered surface before commanding two space shuttle missions, including the program's maiden flight -- has died, ending one of the most storied careers in space history. NASA said he died Friday night following complications from pneumonia. He was 87.

"Today, NASA and the world have lost a pioneer," NASA Administrator Robert Lightfoot said in a statement Saturday. "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."

"John was one of that group of early space pioneers whose bravery and commitment sparked our nation's first great achievements in space," Lightfoot said. "But, not content with that, his hands-on contributions continued long after the last of his six spaceflights -- a world record at the time of his retirement from the cockpit."

Get Breaking News Delivered to Your Inbox

Astronaut Terry Virts tweeted: "Rest In peace John Young. You were one of my heroes as an astronaut and explorer and your passion for space will be missed."

"Saddened for the loss of former astronaut colleague John Young - the astronauts' astronaut, a true legend," Scott Kelly tweeted.

Saddened for the loss of former astronaut colleague John Young - the astronauts’ astronaut, a true legend. Fair winds and following seas, Captain. #RIP pic.twitter.com/cn79DctK6C — Scott Kelly (@StationCDRKelly) January 6, 2018

John Young is one of my heroes, an astronaut’s astronaut, a fearless individual and a good friend. Godspeed. https://t.co/SzqxXOVVqT — Chris Hadfield (@Cmdr_Hadfield) January 6, 2018

A veteran Navy test pilot and Georgia Tech graduate who brought an engineer's keen eye to three generations of spacecraft and NASA management, Young was the first man to fly in space six times and the only astronaut to fly aboard Gemini and Apollo capsules and the space shuttle. He served as chief of NASA's astronaut corps from 1974 to 1987, overseeing 25 shuttle flights during the program's formative years.

Across a 42-year career at NASA, Young was a relentless advocate for flight safety, firing off countless memos that occasionally made him a thorn in the side of NASA management, especially in the wake of the 1986 Challenger disaster. Throughout it all, he brought a dry wit and ready smile that belied a near photographic memory and encyclopedic knowledge of complex space systems.

He also brought a legendary cool nerve to an inherently dangerous job that amazed his compatriots.

"I found out from the flight surgeon later on that my heartbeat was 144 at liftoff," Charlie Duke, one of Young's crewmates on the Apollo 16 moon landing mission, said of his reaction to launch atop a Saturn 5 rocket. "John's (heartbeat) was 70."

"I was either calmer than I thought I was or, as I later noted in the space shuttle, I was too old for it to go any faster," he quipped in his memoir "Forever Young: A Life of Adventure in Air and Space."

Astronaut John Young flew in space six times, twice aboard two-seat Gemini capsules, two missions to the moon during the Apollo program and two flights as commander of the space shuttle, including the program's maiden flight. NASA

He famously smuggled a corned beef sandwich aboard his first Gemini mission and was caught on a "hot microphone" between moonwalks, using colorful language to discuss excessive flatulence that he said was caused by drinking too much orange juice.

"No doubt the orange growers down in my home state of Florida and the company that made Tang, General Foods, weren't too happy with my comments, if they heard them," Young wrote in his memoir. "It made us wish 'the breakfast drink of astronauts' had never been invented!"

Before blasting off aboard the shuttle Columbia on the first flight of the winged orbiter -- the first time anyone had launched aboard an untried spacecraft -- Young was asked if he had any worries.

"Anyone who sits on top of the largest hydrogen-oxygen fueled system in the world, knowing they're going to light the bottom, and and doesn't get a little worried, does not fully understand the situation," he famously deadpanned.

"He was a living legend," said Andrew Chaikin, author of "A Man on the Moon: The Voyages of the Apollo Astronauts." "He had this kind of manner about him, he brought this kind of 'I don't understand the W matrix or anything like that, but what gets me is' and then he'd say what was on his mind and it would just nail the problem. I think he did that to keep people on their toes."

Young was a "profound believer that humanity should be a multi-planet species," Chaikin said. He used to talk about how if we stay on this planet for too long, something's going to get us, whether it was a super volcano or whatever. He really was a true believer."

Young's career reads like a chapter from "The Right Stuff."

A naval aviator and test pilot, Young logged more than 15,275 hours flying time in a variety of aircraft, including 9,200 hours in T-38 jets. He spent 835 hours in space across his six NASA flights, serving as co-pilot of the first Gemini mission in 1965, commander of a second Gemini flight in 1966, lunar module pilot for Apollo 10 in 1969, commander of Apollo 16 in 1972 and commander of the first shuttle flight in 1981.

John Young, left, and commander Gus Grissom during training for the first Gemini mission in 1965. NASA

His sixth and final spaceflight came as commander of Columbia for the ninth shuttle mission in 1983, carrying a European Spacelab module into orbit that served as a test bed of sorts for the kind of research now carried out aboard the International Space Station.

He was in training to command a record seventh mission -- launch of the Hubble Space Telescope -- when Challenger exploded in 1986. In the delay that followed, and the turmoil that ensued, the Hubble launch was put on hold and Young was forced out as chief astronaut.

He stayed at NASA in an advisory capacity, waging an ongoing battle to improve shuttle safety.

"John Young was the consummate space man," Chaikin said. "I can't think of anybody else more devoted to NASA and the space program. In his bones, he was a space explorer."

Born Sept. 24, 1930, in San Francisco, Young grew up in Orlando, Fla., attended Georgia Institute of Technology and earned a bachelor's degree in aeronautical engineering in 1952.

He then joined the Navy, serving aboard a destroyer before earning his wings. After four years with Fighter Squadron 103, Young was assigned to the Navy Test Pilot School, setting two time-to-climb records flying F-4 Phantoms. In September 1962, Young was selected in NASA's second group of astronauts, following the original seven Mercury astronauts.

Three years later, on March 23, 1965, Young blasted off with Mercury astronaut Virgil "Gus" Grissom, the second American in space, atop a Titan rocket on the maiden flight of NASA's two-man Gemini capsule. Grissom and Young tested the spacecraft's ability to change orbits -- critical for future rendezvous missions -- and put NASA's first flight computer through its paces.

Young commanded his second flight, Gemini 10, launching with future Apollo 11 astronaut Mike Collins, on July 18, 1966. During the three-day mission, Young rendezvoused with an Agena target stage and then flew in formation with the spacecraft while Collins walked in space to retrieve a micrometeoroid experiment package.

The Gemini program helped NASA develop the rendezvous and spacewalk techniques needed or Apollo missions to the moon. The Apollo 8 crew orbited the moon in 1968, the Apollo 9 astronauts tested the lunar lander in Earth orbit and Young, along with Apollo 10 crewmates Tom Stafford and Gene Cernan, flew to the moon in May 1969 to test the landing module in lunar orbit.

With Young staying behind in the Apollo command module, Stafford and Cernan descended to within 47,000 feet of the moon's surface in the lunar lander, carrying out a dress rehearsal of the techniques and procedures that would be used two months later when Apollo 11 astronauts Neil Armstrong and Buzz Aldrin carried out the first piloted landing on the moon.

"Apollo 10 had flown for eight days, three minutes and twenty three seconds," Young wrote in his memoir. "Later, when I entered the basic facts and figures of Apollo 10 into my pilot's logbook, I wrote only 'It was a great hop.'"

John Young and pilot Robert Crippen blast off aboard the shuttle Columbia in the program's maiden flight on April 12, 1981. NASA

In April 1972, Young commanded the Apollo 16 mission, landing on the lunar surface with Duke while Ken Mattingly orbited above in the command module. Young and Duke drove an electric moon buggy over 16 miles around the landing site, collecting about 200 pounds of rocks in the Descartes highlands during three moonwalks.

During the first excursions, mission control told the moonwalkers the House of Representatives had approved a budget that included funds for development of the space shuttle.

"The country needs that shuttle mighty bad," Young replied from the moon's surface. "You'll see."

After a final moon landing mission, NASA began full-scale development of the space shuttle. Young became chief astronaut in 1974 and helped with planning the 1975 Apollo-Soyuz Test Project, a mission born in superpower detente that called for U.S. and Soviet spacecraft to dock in orbit.

All the while, NASA was pressing ahead with development of the space shuttle. After a series of approach and landing tests using the prototype shuttle Enterprise, Young and astronaut Bob Crippen were named to fly Columbia into orbit in the program's maiden flight.

The shuttle relied on state-of-the-art main engines and two enormous solid-fuel boosters to make the climb into space. Solid-propellant boosters cannot be turned off once ignited and they had never been used for propulsion with a U.S. manned spacecraft.

The main engines also were a concern, with pumps operating at higher pressures and temperatures than previous engines to squeeze more thrust out of a lighter-weight powerplant. The shuttle used three SSMEs, and development proved difficult with numerous test failures.

Raising the stakes even higher for the first shuttle mission, NASA had never launched a rocket designed to carry astronauts without multiple unpiloted test flights. Young and Crippen would blast off aboard one of the most powerful rocket systems ever developed without a single preceding test flight.

Columbia was equipped with ejection seats for its initial test flights, but escaping from an out-of-control shuttle was problematic at best.

"That was probably the most daring test flight of all time," Chaikin said. "I can't imagine how anybody could do that, but they did it."

The first attempt to launch Columbia on April 10, 1981, was scrubbed due to a computer timing glitch. Finally, three days later, all systems were go for launch. In his memoir, Young captured the excitement -- and concerns -- that were in his mind that morning as he and Crippen suited up.

John Young before his first Gemini flight in 1965. NASA

Along with mentally reviewing abort procedures, "I was also thinking that with all the main engine and main engine pump problems we'd had, we'd be lucky to avoid being killed during ascent. I was also thinking about what a grand time it would be if Crip and I used those ejection seats just to fly through the 5,000 (degree) plumes of the solid rocket motors!

"We didn't get paid to worry bout all those dozens of things that could kill you but it was hard to keep them totally out of mind. I did my best by focusing my thoughts on the procedures."

As it turned out, Columbia climbed smoothly into space, kicking off the shuttle program's 30-year run.

"It felt good to get back to zero gravity," Young wrote. "It had been nine years since Apollo 16. ... All through the flight I would marvel at Earth's fragile beauty."

Columbia performed well throughout the mission, although the loss of several heat-shield tiles caused concern. But re-entry and landing went well and Young guided Columbia to a picture-perfect touchdown on a dry lakebed runway at Edwards Air Force Base, Calif.

"Do I have to take it to the hangar," Young joked with Houston after Columbia rolled to a stop on the dusty lakebed.

"No," astronaut Joe Allen replied from mission control. "We're going to dust it off first."

"We'd done it! We'd pulled it off!" Young wrote in his memoir. "It was an outstanding end-to-end test flight of a very complex aerospace vehicle. As I said while the flight was happening, 'she is performing like a champ, real beautiful.'"

Young commanded Columbia again for the ninth shuttle mission, the first carrying a roomy Spacelab research module in the ship's cargo bay. During re-entry, two of the ship's three auxiliary power units, or APUs, caught fire. The APUs used toxic hydrazine to generate the hydraulic power needed to move the shuttle's elevons the muscle needed for braking and steering.

Engineers would later discover the fire began at an altitude of 40,000 feet. Then, on touchdown, one of the shuttle's main flight computers failed because of internal contamination.

"Not to mince words, we were on fire when we landed, though of course we didn't know it at the time," Young wrote.

Two days later, engineers discovered both APUs exploded within minutes of touchdown. Young had argued for a Kevlar shield to separate the closely-packed APUs in case of a major problem during ascent or entry, "but because it would have cost $8.5 million to install, the space shuttle program office wouldn't allow the shield to be incorporated," Young wrote later.

By this point, the space shuttle had been declared operational, for better or for worse.

"As all of us and the rest of the world would soon find out, it was or the worse," Young wrote. "Far worse."

He was referring to the 1986 Challenger disaster, a devastating failure that destroyed one of NASA's four shuttles and killed its seven-member crew. In the wake of the disaster, Young, as chief astronaut, relentlessly pushed for safety upgrades, firing off memos that frequently angered management.

"Here's the thing about John," Chaikin said. "John was absolutely fearless about making sure he did the right thing, and he just felt it was his responsibility to bring these issues to light, these safety issues, and he did. He annoyed the hell out of some people by doing it.

"He wasn't always right, but his heart was always in the right place, and you could never question his motivation. Many times, he was right on target."

On May 5, 1987, Young was removed from his post as chief astronaut and reassigned as "special assistant" to the director of the Johnson Space Center for engineering, operations and safety.

In a chapter titled "Mountain of Memos," Young said his criticisms "had been found to be too newsworthy for NASA to continue to tolerate." Addressing the astronaut office, Young apologized for "no longer being able to defend them."

The response was a standing ovation.

"My life has been long, and it has been interesting. It's also been a lot of fun, and a lot of hard, challenging work. If I could do it over, I would do it over the very same way. Most of it has been a marvel to me."