Paul Weitz, right, with Joseph Kerwin, left, and Charles Conrad Jr., the astronauts who repaired the Skylab orbiting laboratory in 1973. (AP/ASSOCIATED PRESS)

Paul Weitz, an astronaut who took part in a tension-filled mission to repair the Skylab orbiting laboratory in 1973 and who returned to space 10 years later as commander of the space shuttle Challenger on its maiden voyage, died Oct. 22 at his home in Flagstaff, Ariz. He was 85.

The cause was blood cancer, said his son, Matt Weitz.

Mr. Weitz, a onetime Navy aviator, was part of a crew originally scheduled to conduct scientific experiments aboard Skylab, which was launched May 14, 1973. It rapidly became apparent that the $2.5 billion space station was seriously damaged.

Electronic signals indicated that Skylab’s heat shield, which protected the space laboratory from meteoroids and high temperatures, had been sheared off during liftoff. One of the two solar panels, which produced electricity, also had been torn away, and the other was inoperable.

The mission of Mr. Weitz and his fellow astronauts, Charles P. "Pete" Conrad Jr. and Joseph Kerwin, suddenly shifted from science to something more like an outer-space roadside assistance call. Their launch was delayed several days while NASA engineers assessed problems aboard Skylab and devised tools and equipment for the repairs.

Paul Weitz, foreground, preparing for the launch of the Skylab flight with Charles Conrad Jr. and Joseph Kerwin in 1973. (AP/ASSOCIATED PRESS)

“Never before had a spacecraft gone up amid such an atmosphere of last-minute improvisation,” Time magazine reported.

The astronaut crew was commanded by Conrad, who was on his fourth space flight and in 1969 had become the third person to walk on the moon. Kerwin was a medical doctor, and Mr. Weitz was the mission’s pilot.

After the astronauts’ Apollo spacecraft reached Skylab, Conrad looked at the damage and confidently radioed to NASA flight-control officials, “I think we can take care of it.”

Mr. Weitz leaned out of the hatch of the Apollo capsule, as Kerwin held on to his ankles to keep him from floating away. It was not unlike leaning out the open door of a car traveling on a highway, trying to repair the engine of a car in the next lane.

Using a long-handled hook, Mr. Weitz reached for the solar panel and “gave a mighty heave.”

The 30-foot solar panel didn’t budge. Next, using a pair of long shears similar to those used for trimming branches, Mr. Weitz attempted to cut through a twisted aluminum strap securing the solar panel.

His curses could be heard on the transmissions back to mission control in Houston. After an hour, it was clear that the effort would be futile.

“I hate to say it,” Mr. Weitz admitted, “but we ain’t going to do it with the tools we’ve got.”

The crew regrouped inside the Apollo capsule, then found an unexpected problem: The docking mechanism that would connect the command module to Skylab did not work properly. The astronauts climbed outside their capsule and spent two hours doing mechanical repairs before the space vehicles were linked.

Conrad and Kerwin, working in tandem with a bolt cutter attached to a 25-foot pole, later managed to free the solar panel. The astronauts also worked to install an improvised sun screen on Skylab’s exterior.

“We had to get the temperatures under control if we were going to salvage Skylab at all,” Mr. Weitz said in a 2000 NASA oral history.

The astronauts had three options, with different pipes and fabrics aboard their spacecraft, and ultimately they chose a four-legged “parasol” designed by Jack A. Kinzler, sometimes called NASA’s “Mr. Fix-It.”

The parasol was mostly a success, although one of its legs didn’t extend fully, causing a noticeable variation in temperatures inside the Skylab laboratory.

“Once we moved into the workshop, you could tell by feel,” Mr. Weitz said. “You could outline exactly where the shadow from the parasol was.”

Another way the astronauts monitored the heat was by smell. NASA officials warned the crew to be careful about sampling the food aboard Skylab, suggesting that the roast beef, lobster and butterscotch pudding would have spoiled in temperatures exceeding 100 degrees.

When the astronauts returned after 28 days — the longest space mission at that time — they were hailed as national heroes.

Paul Joseph Weitz was born July 25, 1932, in Erie, Pa. His father was a Navy chief petty officer, and he was raised primarily by an aunt and uncle in Harborcreek, Pa.

He was drawn to flight from an early age and studied aeronautical engineering at Pennsylvania State University. After graduating in 1954, he became a Navy pilot.

He received a master’s degree in aeronautical engineering from the U.S. Naval Postgraduate School in Monterey, Calif., in 1964 and piloted planes during the Vietnam War. He retired at the rank of captain in 1976, a decade after entering the astronaut corps.

NASA’s space shuttle program began in 1981, with the launch of the Columbia. Mr. Weitz was tapped to be the commander of Challenger’s first flight in April 1983. Everything went smoothly on the five-day mission.

On Jan. 28, 1986, Challenger exploded 73 seconds after takeoff, killing all seven crew members on board. Mr. Weitz, who had trained the crew while serving as deputy chief of NASA’s astronaut corps, testified before a presidential commission investigating the cause of the disaster.

He later served as deputy director of the Johnson Space Center in Houston and retired in 1994 as acting director.

His wife of 61 years, the former Suzanne Berry, died in 2016. Survivors include two children, Matt Weitz of Dallas and Cynthia DiFranco of Flagstaff; and a sister.

During his Skylab mission, Mr. Weitz said he found it impossible to sleep in what he called a “make-believe bed” mounted on the space capsule’s wall.

Even though he was in a zero-gravity environment, “emotionally I was hanging from the wall, and I could not sleep hanging from the wall,” he said in 2000. “So every night I’d unbuckle my sleep restraint, which had a metal frame, and I’d take it out . . . so I was sleeping horizontally.”