C. Gordon Fullerton, a NASA astronaut, research pilot and Air Force test pilot whose career spanned almost 50 years, is seen in a 1989 photo. Fullerton died Aug. 21 at 76. (NASA via AP)

LANCASTER, CALIF. — C. Gordon Fullerton, a former astronaut who flew on two space shuttle missions and had an extensive career as a research and test pilot for NASA and the Air Force, died Wednesday, the space agency said. He was 76.

Fullerton suffered a severe stroke in 2009 and had been confined to a long-term care facility in Lancaster for most of the past 3 ˝ years, NASA said in a statement.

An astronaut from 1969 to 1986, Fullerton spent 382 hours in space on his shuttle missions and flew more than 135 different types of aircraft as a test pilot, amassing more than 16,000 flight hours.

Fullerton soared into orbit aboard the shuttle Columbia in March 1982, an eight-day flight test that became the only shuttle mission to land on a backup site at White Sands, N.M. Columbia was diverted because heavy rains in the Mojave Desert flooded Rogers Dry Lake at Edwards Air Force Base, Calif., the primary landing site for the program’s initial years.

In 1985, Fullerton commanded the shuttle Challenger on a flight that carried the Spacelab module in its cargo bay to conduct a wide array of science experiments.

Before space shuttles were operational, Fullerton was a member of one of two crews that flew the shuttle prototype Enterprise in approach-and-landing tests conducted during 1977. Enterprise was released from the top of a modified Boeing 747 to glide down to the desert floor at Edwards.

In 2003, after the loss of Columbia and its seven-member crew during re-entry, Fullerton told a gathering at Edwards that NASA faced its worst crisis but would overcome it. He also said he felt a kinship with the crew.

“Heroes, indeed they are. But in their own minds, they did not consider themselves heroes. I am sure they felt like the luckiest people on Earth as they snapped in at the pad,” Fullerton said. “Columbia was a magnificent machine. She carried us to the greatest adventures of our lives. … It was indeed a magic carpet ride.”

A native of Portland, Ore., Fullerton received bachelor’s and master’s degrees in mechanical engineering from the California Institute of Technology and joined the Air Force in 1958, NASA said.

He flew fighters and bombers, attended the Air Force Research Pilot School and served as a test pilot at Wright-Patterson Air Force Base, Ohio, before being selected for the Air Force Manned Orbiting Laboratory program in 1966. When that program was canceled in 1969, he was assigned to NASA’s astronaut corps at Johnson Space Center in Houston, Texas.

Before reaching space in the shuttle program, he was a member of support crews for NASA’s last four Apollo lunar missions.

Fullerton subsequently transferred to NASA Dryden and spent 22 years as a research test pilot. Among his roles was project pilot for a modified B-52 that conducted aerial launches of Pegasus rockets; the X-38, which was intended to be a vehicle to recover crews from the international space station; and the X-43A, an experimental hypersonic aircraft.

Fullerton lamented the 2004 retirement of the B-52 “mothership,” known by the last three digits of its tail number.

“To me, it’s really a sad day, more like a funeral than a celebration, to realize that I’m not likely to crawl in 008 and go out for another flight,” he said at the time.

“If you were to get in the cockpit now, and wanted to taxi away, you’ve got to start up 22 pieces of rotating machinery before you’re ready to go — eight engines, 10 air-driven hydraulic packs, and four alternators. That’s different than any airplane built before or since,” he said.

In addition to many flight research and airborne science missions, Fullerton also was pilot-in-command of the Boeing 747 aircraft that carried space shuttles on its back on ferry flights from California to Kennedy Space Center in Florida.