TEN YEARS AGO, on the night of July 20, 1969, man stepped out on the moon for the first time. Neil Armstrong went first; Edwin (Buzz) Aldrin followed.

The Apollo program that eventually put 12 men on the moon was a technical masterpiece that may never be matched. In the 10 years it took to reach the moon, three astronauts were burned alive at Cape Canaveral. Four more died in air crashes. In the five years that 27 astronauts flew to the moon and 12 landed on it, none died in space.

When President Kennedy gave birth to Apollo, some of the best minds in the country were giving it one chance in ten of making it to the moon. But inside the newborn National Aeronautics and Space Administration, those fledgling space engineers were choosing much better odds: 999 to 1. Caldwell Johnson, an engineer at the Manned Spacecraft Center in Houston, remembers how the odds were chosen.

"The question of reliability came up," Johnson said not long ago. "Should 50 percent of the missions be successful? Should 9 out of 10 guys come back alive?

"Or should it be 999 out of 1,000 guys? The cost of development is a function of reliability. If you can afford to lose half the spacecraft and half the men, you can build them a damn sight cheaper."

While work on the Apollo design stopped in 1961, the question was debated for weeks. With nobody willing to make a decision, the engineering team turned to Robert Gilruth, then director of the Manned Spacecraft Center. Engineer Max Faget spoke up: "If we're successful half the time, that will be worth it."

"No, that's too low," Gilruth said. "We can make 9 out of 10. Maybe 99 out of 100, lose one man out of 100 on lunar missions."

"That's ridiculous," said Walt Williams, the director of the one-man Mercury. "Make it one in a million."

"How about three nines?" Gilruth responded. "How about a reliability of 9-9-9?"

And so it was. The Apollo spacecraft design, the Saturn rockets that carried the crews to the moon, the computers and navigation devices that brought them home to Earth, were all fixed and agreed upon. Reliability was what Apollo was to be all about, like the reliability of the massive swing arms that served as lifelines to the spacecraft and fuel lines to the rocket before they left Cape Canaveral for the moon.

Four of the nine swing arms stayed connected to the giant rocket until its engins began pulling it away from Earth, then swung back in unison in a fraction of a second to let the rocket rise unimpeded into the sky. Even though the smallest swing arm weighed 43,000 pounds, all four had to come gently to rest, like doors suddenly closed but never slammed shut. They had to work in the humid heat of a Florida summer, winds up to 60 miles an hour and rocket vibrations as strong as an earthquake. They had to be more reliable than a light switch turned on and off 10 million times.

And they were. Recalled Caldwell Johnson: "If we had taken one decimal point off that thing, you could have cut the cost in half. If we'd added another decimal, there was not enough money to have ever done it."

The nation was in a sour mood in April 1961. First, there was Yuri Gagarin. And then the Bay of Pigs. Jack Kennedy pleaded for ideas on how to beat the Russians but the experts warned him not to start a space race. Some of the country's best brains advised Kennedy to cancel Alan Shepard's maiden Mercury flight.

A year before, the same people were telling Eisenhower to orbit 50 chimpanzees before a single man; one recommended moving the program to Africa because there weren't 50 trained chimps in America. Reluctantly, Eisenhower had approved the starting of the Mercury project.

His Russian-born science adviser, George Kistiakowsky, summed up the White House mood. "Manned space flight," he said grimly to a group of fledgling space engineers, "will be man's most expensive funeral."

On April 28, Kennedy called a secret meeting in the White House to discuss Shepard's flight. "We can't afford to have a man go up in flames on the launch pad," said White House scienceadviser Jerome Wiesner, sounding like Kistiakowsky before him. Kennedy looked questioningly at Edward Welsh, then director of the National Space Council.

"Mr. President," Welsh said softly, "why postpone a success?" Asked Kennedy: "Do you have that much confidence in Mercury?" Replied Welsh: "As much as I have flying from New York to Hawaii.... It's perfectly safe."

When Kennedy said yes to Shepard's flight, Lyndon Johnson called in Wernher von Braun and asked him if the United States had a chance of beating the Russians. "The goal should be the lunar landing," von Braun told Johnson. "The Russians will be ahead every step of the way but we can beat them to the moon if we start now."

LBJ needed one more thing: Alan Shepard alive and well at splashdown. He got it May 5. Before Shepard could dry off, Johnson was on the phone to NASA Administrator James E. Webb and Defense Secretary Robert S. McNamara to draw up a justification paper for a lunar landing. LBJ told them he wanted to hand it to Kennedy in three days. Webb and McNamara went to work and in three days wrote a 30-page document that stayed classified for 12 years.

"It is our belief that manned exploration to the surface of the moon represents a major area in which international competition in space will be conducted," their report said. "The orbiting of machines is not the same as orbiting or landing of man. It is man in space that captures the imagination of the world."

It was just what Kennedy wanted to hear. On May 25, Kennedy stood before Congress and laid down the challenge. Apollo had begun.

NASA and the Air Force was locked in mortal combat later that year over who was going to win control over Apollo. Nasa strategy was to get Congress to buy the land north of the Air Force Eastern Test Range at Cape Canaveral and deed the land to NASA; Air Force strategy was to block that move and force NASA to use the test range. That way, the Air Force would have the say over what would be allowed and when it would be allowed.

The Air Force didn't have Texas Congressman "Tiger" Teague on its side. When Teague asked the Air Force how it would supply things like machine shop service to a demanding civilian tenant like NASA, the Air Force replied that it had so much excess facility at Cape Canaveral it would never be a problem.

The next day, Teague flew to Cape Canaveral and showed up the following morning at 7 at the Air Force machine shop. Teague found the foreman and asked him how busy he was. "We can't handle another work order," the foreman said. "We're so busy now we're working around the clock."

A few weeks later, Teague watched with NASA's Launch Operations Director Rocco Petrone while a Saturn rocket was launched from an Air Force pad. Petrone had a rule that nobody was allowed on a pad after the launch until an inspection team found no loose electrical cables or spilled rocket fuel on the pad that would endanger safety. The rule didn't stop the Air Force general in charge of the test range walking from the blockhouse to the pad with two of his aides.

"See that?" Petrone said to Teague. "That's a good example of Air Force cooperation." Teague said nothing but a week later wrote the language in the NASA authorization bill that said: "NASA will buy and retain" 80,000 acres of land on Merritt Island just north of the Eastern Test Range. The bill came up for a conference vote a few days later with the Senate Space Committee, which did not have that language in its version of the money bill.

Just before Teague met with the Senate committee members, his secretary logged three phone calls. One was from Deputy Secretary of Defense Roswell Gilpatric, another from Air Force Secretary Eugene Zuckert and the third from Air Force Gen. Bernard Shriever. He answered none of them, then walked into the conference room and announced to the Senate conferees: "I'll change anything in this bill but three words: 'buy and retain."" That was the end of the conflict. NASA had won its independence.

Apollo faltered badly in the late summer of 1963, a few months before Kennedy was murdered in Dallas. The Russian lead had widened to where Sens. Barry Goldwater and Harry Cannon demanded Apollo be turned over to the U.S. Air Force and Congress had just cut $400 million from the Apollo budget. In late September, U.N. Ambassador Adlai Stevenson wrote a speech that Kennedy gave at the U.N. in which he suggested the United States fly to the moon with the Russians.

When the dust settled, nobody admitted having a hand in it. Stevenson denied writing it and presidential assistant Arthur Schlesinger denied writing the key sentence about cooperation with the Russians. The fact is, both men collaborated on the speech and passed word to the space agency that the speech was coming and that space agency response was to be: "No comment." The Congress was furious.

But then Deputy NASA Administrator Bob Seamans said "off the record" to a few members of the press: "Well, frankly, gentlemen, I'm not smart enough to run a giant program with the Russians. I have a hard enough time getting American engineers to talk to one another." The day he was shot, Kennedy told Texas Congressmen Tiger Teague and Albert Thomas that the U.N. speech was a mistake. "You know, the space program needs more identification," Kennedy said. "I plan on going to Cape Canaveral again to give it some." Those were his last words about space.

Squish. The boot of Edwin (Buzz) Aldrin squished when he became the second man behind Neil Armstrong to step out on the moon. Each time he took a step, that's what Aldrin felt in his left boot because that's where Aldrin's urine bag was strapped.

When Aldrin planted his left foot on the moon, his urine bag broke and he squished his way through the most historic walk two people ever took.

It was different with Pete Conrad and Alan Bean, who flew Apollo 12 to the lunar surface. They were so covered with moon dust when left l(ft the moon to rendezvous with their comrade Dick Gordon that Gordon ordered them to take off their spacesuits before he'd let them in the command craft. "We stripped naked," Conrad said, "and transferred the suits up to Dick." Naked they were except for their heads. Conrad and Bean kept their helmets on because the dust they took in with them was getting in their eyes. "It wasn't a very good configuration to be in," Bean said, "but we had no alternatives at the time."

Twelve years after the fire that incinerated Gus Grissom, Roger Chaffee and Ed White, the effects of that tragedy linger on. One who remembers best is one-time Apollo Spacecraft Manager Joe Shea, who in four months went from his job in Houston alongside the astronauts to a NASA headquarters job in Washington, then to Polaroid and then to Raytheon. Nobody remembers the Apollo fire with the intensity that Shea does.

"We'd been concerned about fire," Shea said, "and the way you handle fire is to keep anything that might spark - because the only way you'd start a fire would be by an electrical short of some kind - keep it away from anything that might burn, so there wasn't any chance something might sputter. Anything that could cause a spark and ignite something else was a hazard."

The day of the fire (Jan. 27, 1967), Apollo Spacecraft 204 was a fire hazard. The astronauts had installed extra Raschel netting to hold things in place; Raschel netting is flammable. They'd added 4,000 square inches of Velcro to fasten things down; Velcro is flammable. Loose pads littered the spacefraft floor.

"I remember saying that same day, 'Hey, let's pull that stuff out of there because it's an O-2 [pure oxygen] test," Shea remembered. "We were literally talking about that kind of thing the morning of the accident."

The Apollo fire claimed more than three casualties. One of Shea's deputies suffered a nervous breakdown. Shea spent the night with him, talking him into entering a rest home. The family minister arrived, suggesting the same thing. The next day, the man was taken to a sanitarium in a straitjacket.

Joe Shea seemed ready for the straitjacket too. He made a four-week study of where Apollo stood in the aftermath of the fire, driving himself 18 hours a day, playing handball for two hours and sleeping with the help of drugs the other four hours. NASA Administrator Bob Seamans told him to go on extended leave. A press release was prepared saying Shea was taking extended leave. Shea refused to take it.

"I said I'll abide by the decision of any competent psychiatrist," Shea said. "And so we set it up at the Houston Medical Center with two doctors. I forget their names, but this one guy said: 'You're stronger for what you've been through." That was fed back [to Washington] and they dropped it...."

Has Joe tshea forgotten the fire? On his On his living room wall hangs a picture of the three dead crew members praying before a model of Apollo Spacecraft 204.

Six groups of astronauts, 66 men, were recruited to train for Apollo. Groups 1, 2, 3 and 5 were made up of experienced pilots, mostly test pilots and fighter pilots. Groups 4 and 6 were scientists, trained to be pilots after they were recruited. In Apollo gamesmanship, the Original Seven outranked the Second Nine, who outranked the Third 14, etc.Astronauts who'd flown in space pulled more weight than astronauts who hadn't. At the bottom of the pile were the scientists, regardless of their skills.

Few Apollo astronauts were openly disliked by their peers, with one exception - the entire crew of Apollo 7: Wally Schirra, Donn Eisele and Walt Cunningham. Director of Flight Crew Operations Christopher Columbus Kraft Jr. called Schirra "Jekyll and Hyde." The test crews at Cape Canaveral hung a pennant where they trained Schirra's crew. It said enigmatically: GROTSOB. Get Rid of the Sons of Bitches. Schirra's crew was launched in winds that gusted up to 22 miles an hour and when he returned to Earth he wrote a letter to Joe Shea's successor, George M. Low, accusing Low of trying to kill him.

In the 11-day flight of Apollo 7, Schirra carped constantly at the ground, refusing to do tests he'd been asked to do. Cunningham complained about the same tests and Eisele fell asleep at the controls. All three left NASA in less than a year. When Cunningham returned from Apollo 7, he called Chris Kraft and said, "I hear you've been telling people the next time I fly it will be over your dead body." Kraft never hesitated: "You got it from the horse's mouth."

The trophy for bickering in Apollo would go to Manned Spacecraft Center Director Bob Gilruth and Marshall Space Flight Center Director Wernher von Braun, who were always fighting with each other for more control of Apollo. The bickering got so bad in 1967 that NASA secretly sent the two of them to Antarctica for 10 days to iron out their differences.

No mission caused more dissent inside Apollo than the Christmas 1968 flight of Apollo 8 around the moon. Apollo 8 started out as another trip into earth orbit but the lunar module it was to carry with it wasn't ready for flight. What followed was a series of moves that could only be described as Machiavellian.

As early as Aug. 7, Apollo Spacecraft Manager George Low recognized that a lunar module mission was impossible and so suggested the "feasibility of a lunar orbit mission" without the lunar module. Enthusiasm for the mission was unrestrained in Houston and quite restrained in Washington.

George Mueller, director of manned space flight, was dead set against it. "Too risky," he said. Mueller wanted at least one more mission in earth orbit before flying anybody to the moon. Former Apollo Spacecraft Manager Joe Shea, whose job George Low had taken, ridiculed the plan. "The lunar module was necessary for redundance and even more than that there was little sense in going to the moon to go around it," Shea said. "When you went to the moon, you ought to be serious about landing."

Two things swung the decision the other way. Flight engineers in Houston said the trip would be invaluable as a pathfinder flight for subsequent lunar crews. More important, the Russians were making menacing noises that sounded as if they were planning a one-man kimikaze flight around the moon to beat the United States. In a short time, the Russians flew three unmanned Zond spacefraft that did not go into orbit but did take them behind the moon on a "free-fall" flight path back to earth. The first Zond crashed when it returned, the second fell far short of its Indian Ocean target but the third splashed down off the coast of Malagasy right where it was aimed.

It wasn't hard imagining a volunteer cosmonaut strapped inside the fourth Zond. In fact, the CIA told NASA to expect it right after New Year's Day. But even then, George Mueller remained opposed to a lunar orbit mission. So Robert Gilruth, Chris Kraft, George Low and Chief Astronaut Deke Slayton met secretly with von Braun, Kennedy Space Center Director Kurt Debus and Apollo Program Director Sam Phillips. The plan to fly to the moon was reviewed and approved. George Mueller was not told of the meeting.

Four days later, the plan was hustled up to Washington on the day Mueller left for Europe with NASA Administrator James E. Webb.But this time, Mueller heard about the meeting and telephoned his objections from Paris. Mueller told Sam Phillips he would not be back for eight days and any decision would have to wait until his return. "We all agreed to keep going," Low recalled. "We could not wait for a decision."

The impetus of fear was hard at work, fear that the Russians would fly around the moon first and fear that a delay would imperil the goal of landing on the moon by 1970. Slayton warned: "This is the only chance to get to the moon before the end of the decade." Von Braun minimized the risk of flying men for the first time on the Saturn 5 moon rocket. "Once you decide to man it," von Braun said, "it doesn't matter how far you go on it."

New Deputy Administrator Thomas O. Paine agreed, and the plan was approved. But one more hurdle remained. In September, just after the rocket was moved to the launch pad, a huge hurricane appeared off the Florida coast and started moving toward Cape Canaveral.

"Yoy'd better get that bird off the pad," Apollo Launch Director Rocco Petrone was told. Whereupon, Paul Donnelly, Petrone's deputy said: "You take it off the pad and you can kiss going to the moon this year goodbye." Petrone gambled against the hurricane and won.

The rest is history. On Nov. 10, the Apollo contractors were polled and only one raised a question. Walter Burke of McDonnell-Douglas favored a flight once around the moon instead of the riskier orbital mission.

The only dissent after the flight came from two of the three astronauts who made it. Deke Slayton smuggled three ponies of brandy aboard the spacecraft for the crew to have Christmas Eve in lunar orbit. Commander Frank Borman ruled against the brandy. Apollo 8 returned to Earth with Borman, Jim Lovell and Bill Anders and the unbroken seals on three ponies of brandy.

What happened to the Russians?

"They abandoned their moon program," Chris Kraft says. "We just took the wind out of their sails."

The flight of Apollo 8 took most of the world by surprise. People weren't really ready for it. New York Daily News Executive Editor Floyd Barger asked newsman Mark Bloom: "When they say, 'All systems are go"...how many systems do they mean?" New York Times Publisher Arthur Ochs Sulzberger asked Timesman John Wilford: "How will they see when they go behind the moon? Are they going to drop flares?"

The fire that killed Grissom, Chaffee and White changed a lot of thinking about safety in Apollo. One thing was a need for an emergency escape route from the spacecraft at the top of the launch tower. Congress and NASA Headquarters forced it on the program as a mission rule. No emergency escape route, no mission. Design and test one before Apollo 8.

The concept agreed on was a guide wire running from the pad's 36th story with a bar hooked to the wire. In an emergency, the astronauts would scramble from the spacecraft and hook harnesses to the bar the way parachutists do and slide down the wire to the ground. It worked so well with dummies that Kennedy Space Center Director Kurt Debus was invited to witness the next test.

"They hooked a dummy to the bar," Test Director Bill Shick remembers, "shoved the bar forward, released it and as the bar cleared the takeoff the dummy flew down 36 stories and bounced right at Debus' feet." Debus looked down at the dummy and then up at nobody and said: "Get rid of that god-dam bar and go back to the goddam drawing board." That meant a crash program to build a cab to carry as many as nine people. The steep angle a cab would have to come down meant a new braking system for the cab. The cab was qualified two days before the countdown of Apollo 8 began.

Of all the Apollo crews, none struggled with discomfort like Apollo 13 astronauts Jim Lovell, Fred Haise and Jack Swigert. Their oxygen tank exploded on the way to the moon, making it dark and cold in the command craft. "Like a tomb," Lovell said. It got colder because they had to use vacuum hoses to circulate air through the cabins of their two joined spacecraft. They ran short of water, then discovered they couldn't dump their urine overboard because of the loss of power. "So we kept the urine on board," Lovell said, "and had to figure out ways of keeping it." They kept it in juice bags, water bags and rock bags. "We had urine all over the place," Lovell said, "stacked in places we never even thought about."

As it got colder, the humidity rose because the one working spacecraft couldn't pull all the water out of the cabin air. That frosted the windows, making it still colder. Then, a water gun broke, leaking a quart of water into the weightless cabin. "It took six towels to sop it up," Swigert said, "and two days to get my feet dry. Man, were my feet cold." If that wasn't enough, there was no hot water to reconstitute the freeze-dried food. So the crew ate sandwich spreads and drank fruit juice. What made time pass were the procedures they dreamed up to get around all this. "It's like putting up the antenna in a liferaft," Lovell said."Maybe it'll keep you busy for awhile."

You'd think people flying to the moon would want to prolong the experience. Think again. "My only comment," said Apollo 12's Pete Conrad to debriefers in Houston, "is we should have come home in two days instead of three." Apollo 12 crew member Dick Gordon: "Yeah, we had the fuel." Third crew member Al Bean: "I wish I'd taken a pocket book to read because there's a lot of loose time on the way home. In our case, the Earth was about one-sixteenth full so you couldn't see anything. The moon? You'd been looking at it for two days and you didn't want to look at it again."

if Bean knew of the reception waiting for him, he wouldn't have been in a rush to get home. Unknown to the world, a 16-millimeter camera bracketed to the spacecraft wall whistled loose at splashdown and smacked Bean in the bean. "It cold-cocked him," Conrad told the debriefers. "He didn't realize it but he was out to lunch for about five seconds. He was blankly staring at the instrument panel. I was convinced he was dead over there in the right seat." Bean needed six stitches to close the worst wound inflicted on any Apollo crewman. Before the doctors got to Bean, Conrad plastered the wound with a Band-Aid "so the whole world wouldn't get upset" when they saw him on television.

They were relaxing on their way back from Houston to Washington, having a drink in the back of the Gulfstream after Apollo 11, when Apollo Operations Director John D. Stevenson turned to Wernher von Braun and said with a slight smile: "Wernher, where were you on the night of June 26, 1944?" Looking a little surprised, von Braun said: "How the hell do I know?" Then it dawned on him. "Wait a minute," von Braun said."That was the night of the worst air raid all through the war at Peenemunde. I was almost killed that night.... Why do you want to know?" Lifting his glass, Stevenson said: "Because I led the raid." CAPTION: Pictures 1, 2 and 3, no caption, NASA photos; Picture 4, no caption, NASA photos; Picture 5, no caption; Picture 6, no caption; Pictures 7, 8, 9 and 10, no caption