Forrest S. McCartney, a retired Air Force lieutenant general who played a central role in developing military spy satellites and the MX intercontinental missile system before being appointed head of NASA’s civilian-run Kennedy Space Center not long after the space shuttle Challenger exploded, died Tuesday in a hospice near Cape Canaveral, Fla. He was 81.

The cause was cancer, his daughter Worthy McCartney said.

General McCartney was given command of the space center 18 months after the Challenger exploded on Jan. 28, 1986, killing all seven crew members aboard and leading to the suspension of the shuttle orbiter program. His deployment from the ranks of a largely secret military space program made him the focus of initial apprehension in the parallel civilian space-exploration universe.

But historians of NASA generally credit him with rebuilding public confidence in manned space missions, and helping restore the morale of a shaken work force at Cape Canaveral. He directed an extensive review of construction and launching protocols, oversaw the first shuttle launching after the Challenger disaster, and became known as a subtle but relentless defender of Kennedy Space Center turf in the perennial struggle with other NASA power centers, including the Johnson Space Center in Houston, the Marshall Space Flight Center in Huntsville, Ala., and NASA headquarters in Washington.

Confusion over the chain of command had been identified by investigators as one of the causes of the 1986 disaster. In a 2001 interview with the Kennedy Space Center’s oral history project, General McCartney referred to that problem in describing his efforts to make the Kennedy Space Center’s leaders first among equals in decision making, at least in the matter of launchings.