Famed Apollo 13 astronaut Ken Mattingly dies at 87

Ken Mattingly was scheduled to be the pilot on Apollo 13. Because of a cold, Mattingly could not go on the mission, which narrowly avoided tragedy when its spacecraft malfunctioned. and had to return to Earth without landing on the Moon, with no marg

Ken Mattingly, an astronaut who is best remembered for his efforts on the ground that helped bring the damaged Apollo 13 spacecraft safely back to Earth, has died, NASA announced. He was 87.

"We lost one of our country’s heroes on Oct. 31," NASA Administrator Bill Nelson said in a Thursday statement.

Thomas Kenneth Mattingly II "was key to the success of our Apollo Program, and his shining personality will ensure he is remembered throughout history," Nelson said.

NASA didn't mention where or how Mattingly died. However, The New York Times reported that Mattingly died in Arlington, Virginia.

A former Navy pilot, Mattingly joined NASA in 1966. He helped with development of the spacesuit and backpack for the Apollo moon missions, NASA said.

However, his own first spaceflight only came in 1972 when he orbited the moon as pilot of the Apollo 16 command module, while two other crew members landed on the moon's surface.

RELATED: November night sky highlights: Jupiter on display, Leonid meteor shower peak

On the trip back to Earth, Mattingly spacewalked to collect film cannisters with photographs he had snapped of the moon's surface.

In later years, Mattingly commanded two space shuttle missions and retired from the agency and the Navy as a rear admiral.

But his most dramatic mission was one that he never flew.

In 1970, Mattingly was supposed to have joined the crew of Apollo 13, piloting the command module. But he was removed from the mission a few days before launch after being exposed to German measles.

He didn't contract the illness but was replaced aboard the mission by John Swigert Jr.

Several days into the mission, an oxygen tank on the spacecraft's service module exploded, knocking out most of the power and oxygen to the command module. The lunar landing was scrapped and NASA began frantic efforts to save Swigert, James Lovell and Fred Haise.

Mattingly, who knew the spacecraft intimately, worked with engineers and others as they analyzed the situation and scrambled to find solutions and pass on instructions to the crew.

GettyImages-1157144817.jpg

Astronaut Thomas Kenneth 'Ken' Mattingly II celebrates the successful rescue of the Apollo 13 spacecraft and crew with a box of cigars at the Mission Control of the Manned Spacecraft Center in Houston, Texas, following the aborted lunar landing missi

The trio of astronauts eventually crowded into the lander, which was designed for only two, and used it as a lifeboat for four days as Apollo 13 swung around the moon and then landed safely on Earth.

Mattingly "stayed behind and provided key real-time decisions to successfully bring home the wounded spacecraft and the crew," NASA's Nelson said.

RELATED: NASA targets April for Boeing Starliner's first astronaut launch

"One of the many lessons out of all this is starting on day one it was from the very first moment, assume you’re going to succeed and don’t do anything that gets in the way," Mattingly recalled in an oral history interview for NASA in 2001.

Apollo 13's story was told in the 1994 book "Lost Moon: The Perilous Voyage of Apollo 13," co-authored by Lovell, and in the 1995 movie "Apollo 13," where Gary Sinise played Mattingly.