Robert “Ed” Smylie, the NASA official who led a team of engineers that cobbled together an apparatus made of cardboard, plastic bags and duct tape that saved the Apollo 13 crew in 1970 after an explosion crippled the spacecraft as it sped toward the moon, died April 21 in Crossville, Tennessee. He was 95.

His death, at a hospice facility, was confirmed by his son, Steven.

The day after astronauts Jim Lovell, Jack Swigert and Fred Haise returned to Earth on April 17, 1970, President Richard Nixon awarded NASA’s mission operations team with the Presidential Medal of Freedom. In his remarks, he singled out Smylie and his deputy, James V. Correale.

“They are men whose names simply represent the whole team,” Nixon said at a ceremony at the Manned Spacecraft Center in Houston. “And they had a jerry-built operation which worked, and had that not occurred, these men would not have gotten back.”

Soft-spoken, with an accent that revealed his Mississippi upbringing, Smylie was relaxing at home in Houston on the evening of April 13 when Lovell radioed mission control with his famous (and frequently misquoted) line: “Uh, Houston, we’ve had a problem.”

An oxygen tank had exploded, crippling the spacecraft’s command module.

Smylie, who lived five houses down from Haise, saw the news on television and called the crew systems office, according to the 1994 book “Lost Moon” by Lovell and journalist Jeffrey Kluger. The desk operator said the astronauts were retreating to the lunar excursion module, which was supposed to shuttle two crew members to the moon.

“I’m coming in,” Smylie said.

Smylie knew there was a problem with this plan: The lunar module was equipped to safely handle air flow for only two astronauts. Three humans would generate lethal levels of carbon dioxide.

To survive, the astronauts would need to somehow refresh the canisters of lithium hydroxide that would absorb the poisonous gases in the lunar excursion module. There were extra canisters in the command module, but they were square; the lunar module ones were round.

“You can’t put a square peg in a round hole, and that’s what we had,” Smylie said in the documentary “XIII” (2021).

He and about 60 other engineers had less than two days to invent a solution using materials already onboard the spacecraft.

The crisis is depicted in Ron Howard’s 1995 blockbuster film, “Apollo 13,” starring Tom Hanks as Lovell, Kevin Bacon as Swigert and Bill Paxton as Haise.

Onscreen, a character inspired by Smylie dramatically dumps rubber tubes, garment bags, duct tape and other materials onto a table. “The people upstairs handed us this one,” the character says, “and we gotta come through.”

In reality, the engineers printed a supply list of the equipment that was onboard.

Their ingenious solution: an adapter made of two lithium hydroxide canisters from the command module, plastic bags used for garments, cardboard from the cover of the flight plan, a spacesuit hose and a roll of gray duct tape.

“If you’re a Southern boy, if it moves and it’s not supposed to, you use duct tape,” Smylie said in the documentary. “That’s where we were. We had duct tape, and we had to tape it in a way that we could hook the environmental control system hose to the command module canister.”

Mission control commanders provided step-by-step instructions to the astronauts for locating materials and building the adapter. In between steps, they joked about taxes. (It was, after all, April.)

“OK, Jack,” one of the commanders radioed. “Did anybody ever tell you that you got a 60-day extension on your income tax? Over.”

“Yes,” Swigert replied. “I think somebody said that when you are out of your country, you get a 60-day extension.”

The adapter worked. The astronauts were able to breathe safely in the lunar module for two days as they awaited the appropriate trajectory to fly the hobbled command module home. They landed in the Pacific Ocean.

“We would have died had their solution not worked,” Haise said in an interview. “I don’t know what more you can say about that.”

Robert Edwin Smylie, known as Ed, was born on Dec. 25, 1929.

After serving in the U.S. Navy, Smylie studied mechanical engineering at Mississippi State University, earning a bachelor’s degree in 1952 and a master’s in 1956. He pursued a doctorate at UCLA but didn’t finish.