When NASA finally announced Monday that it would undertake an unprecedented spacewalk to repair the underside of the space shuttle Discovery, officials portrayed the job as almost routine. But the decision was anything but routine, and NASA needed four days to make it.

Even then, Discovery's astronauts had misgivings about touching the most sensitive and vulnerable part of the orbiter without being certain anything was wrong.

In the end, both Mission Control in Houston and Discovery's seven-member crew, flying 222 miles above Earth, agreed that the potential danger of the shuttle overheating during reentry outweighed the risk of making the first onboard, in-flight shuttle repair and of violating an agency taboo.

As spacewalks go, having Stephen Robinson pluck two pieces of protruding fabric from gaps in Discovery's thermal tiles was conceptually easy, NASA officials said Tuesday. It could probably be done in less than two hours by putting Robinson on board the international space station's 55-foot crane Wednesday morning and lowering him beneath the orbiter.

But the officials said the relative ease of the task did not carry any weight with decisionmakers at first. To do the job, Robinson would have to tinker with the orbiter's heat shielding, the shuttle's Achilles' heel. No one wanted to do that.

Discovery is built to withstand reentry temperatures of 2,300 degrees Fahrenheit on the belly tiles where Robinson will be sent, and much higher temperatures on the "reinforced carbon-carbon" that protects the leading edges of the orbiter's wings and its nose cap.

But no one would call it robust. Hit it with a hard object, or a fast-moving piece of insulating foam from the shuttle's external tank, and the shielding will shatter with stupefying results.

The shuttle Columbia disintegrated on reentry after a piece of foam hit heat shielding on its leading edge, causing NASA to ground the shuttle fleet for 21/2 years. Now the fleet is grounded again because Discovery's external tank lost a piece of foam during launch. It hurtled harmlessly into the void, but NASA officials acknowledged Discovery had dodged a bullet.

This was the conundrum facing engineers at Mission Control last Friday. New inspection equipment, installed after the Columbia disaster, had found two protruding "gap fillers," strips of ceramic-coated fabric, sticking out about an inch from cracks in the patchwork of thermal tiles beneath the orbiter.

Technicians had seen scores of protruding gap fillers before, but never in space, and seldom as long as an inch. NASA officials do not know if they are harmless shreds of insulation that can be ignored, or potential hazards that could interfere with the smooth cloak of white-hot gas that envelops the shuttle when it reenters Earth's upper atmosphere at 20 times the speed of sound.

"Trip" this "boundary layer" too early and the shuttle could build turbulent "hot spots" on the thermal undercoat, interfering with handling, or, worse, raising the heat of the shuttle's aluminum skin to unacceptable -- even catastrophic -- levels.

But in pre-inspection days, shuttles had flown with protruding gap fillers, and, as Paul Hill, Discovery's lead flight director, said Tuesday at a Johnson Space Center news conference, that appeared to be a good enough reason not to do anything. "You don't ever want to get close to the thermal protection system," he said.

Aerodynamicists were analyzing the potential boundary layer effects to see if they could declare Discovery okay. In case they could not, NASA worked on a spacewalk to fix the problem. "Most of the folks in the room didn't want to do this," Hill said.

The spacewalk team decided to put Robinson in foot restraints on the space station crane because it is stiffer than the shuttle's crane. It would not quiver more than a couple of inches if he made an untoward motion. He would not pitch into the tiles.

Discovery astronauts could use the shuttle crane arm and cameras on its 50-foot boom extension to watch Robinson work. The other spacewalker, Soichi Noguchi, would take a position high on the space station in sight of Robinson. If communications were a problem, signals could pass through Noguchi.

Computer programs would get the crane to take Robinson within a few feet of the tile face, then he would talk crane operators Wendy Lawrence and James Kelly onto the target.

"As long as Steve gives directions, the crane moves," said astronaut David Wolf, the special team's spacewalk chief. "Anytime there's silence, it stops." If communications somehow failed, the spacewalk would end immediately, he said, with a second try to be made later.

Team leader Kelly Beck said the initial reluctance at Mission Control began to recede. The spacewalkers analyzed body positions and decided to put Robinson a foot or so from the tile face with the gap filler about head high.

Securing Robinson's safety tether between his legs would keep it from moving, Wolf said. The team also decided to cut back on Robinson's tools and other spacewalk paraphernalia so nothing dangled or flipped around to hit the tiles.

"The task looked pretty straightforward," Beck said, but Mission Control did not initially agree. By Sunday evening, the leadership was starting to waver.

Wolf's team worked on mock-ups. It estimated that a tug of one pound of force would pull out the filler. If that did not work, the team decided, Robinson would receive three tools. One was a pair of forceps, almost exactly the same size and shape as those used by surgeons to hold an incision open. If Robinson's gloved fingers could not grab the gap fillers, he could pluck them out with the forceps. If that failed, he would slice the gap fillers off with a makeshift hacksaw. In tests, the blade sawed gently through the gap filler without scarring surrounding tile.

Finally, the spacewalk ground team added a pair of astronaut scissors. If all else failed, Robinson could clip the gap fillers, even though he probably would leave a protruding tuft. "We really don't want to use the scissors," Wolf said.

At a Sunday morning news conference, Hill for the first time sounded optimistic about the job. By Sunday evening, Wayne Hale, the deputy shuttle program manager, seemed to agree.

The decision came Monday. Aerodynamicist Chuck Campbell told reporters that his team could not judge the risk of reentry from the scant data available. Nothing but the shuttle flies at Mach 22 at 260,000 feet, he said, and "there is a lot of uncertainty."

Fortunately, Hale added, the two offending gap fillers were not intended to be part of the heat shielding, but had been inserted between tiles as shims to prevent them from "chattering" during launch. In orbit, the fillers served no purpose and could be removed with impunity.

When Discovery astronauts reviewed the spacewalk instructions when they awoke late Monday, "they had the same reaction as we did at first," Hill said. "But by the end of the day, they were feeling real good about it. It took them some time to evolve, like it did us."

The risk, the astronauts said, appeared to be minimal, and the job relatively simple: "I'll be leaning in towards the orbiter," Robinson said Tuesday. "The thing I'll be watching most closely is the top of my helmet."

President Bush thanked the Discovery astronauts for being "risk-takers for the sake of exploration."

Japanese astronaut Soichi Noguchi waves at crewmate Stephen Robinson, seen reflected in his helmet, outside the space shuttle Discovery.