(WHNT) — Former NASA astronaut Ken “TK” Mattingly, who commanded two space shuttle missions, has died.

Mattingly died Tuesday at the age of 87, said NASA administrator Bill Nelson, noting that the country had lost one of its heroes.

“NASA astronaut TK Mattingly was key to the success of our Apollo Program, and his shining personality will ensure he is remembered throughout history,” Nelson said.

Born in Chicago on March 17, 1936, Mattingly was raised in Florida. He graduated from Auburn University with a bachelor’s degree in Aeronautical Engineering in 1958.

His career began in the Navy, where he received his pilot wings in 1960. He eventually joined the Air Force Aerospace Research Pilot School and was chosen by NASA for the astronaut class in 1966.

Nelson said Mattingly not only showed exceptional piloting skills but also contributed to the Apollo Program.

Even before flying in space, Mattingly worked in the astronaut support crew and took a leading role in the development of the Apollo spacesuit and backpack.

He put those piloting skills to good use when he went to the moon on Apollo 16 as well as two other space shuttle missions: Columbia and Discovery.

“His unparalleled skill as a pilot aided us when he took on the role of command module pilot for Apollo 16 and spacecraft commander for space shuttle missions STS-4 and STS 51-C,” Nelson said. “The commitment to innovation and resilience toward opposition made TK an excellent figure to embody our mission and our nation’s admiration.”

Mattingly is also well-known for the mission in which he did not fly. The astronaut had been designated as the command module pilot for the famous Apollo 13 mission in 1970 but was scrubbed just 72 days before launch due to exposure to German measles.

Nelson said despite not taking part in the mission, Mattingly was a key player in saving lives after an oxygen tank exploded, turning Apollo 13 into what NASA calls one of the most intense episodes in the history of space exploration.

“Perhaps his most dramatic role at NASA was after exposure to rubella just before the launch of Apollo 13,” the administrator said. “He stayed behind and provided key real-time decisions to successfully bring home the wounded spacecraft and the crew of Apollo 13, NASA astronauts James Lovell, Jack Swigert, and Fred Haise.”

When the space mission was turned into the 1995 feature film, Mattingly was portrayed by Gary Sinise.

He continued to work for NASA through the 1980s but eventually retired from the space agency and the U.S. Navy as a rear admiral.