When your assignment is to put a space probe on another planet, be prepared to sweat.

"We were all shell-shocked from Ranger," Shoemaker says. "Hell, I wouldn't have given you a 10 percent chance that Surveyor 1 was going to land." Not only had Surveyor 1 landed on the Ocean of Storms, it had done so at a comfortable 10 mph. Half an hour later, the first television images began to appear on the monitors at JPL, showing a round footpad perched on a dusty but firm moonscape. As Surveyor's pictures revealed a 100-foot crater rimmed with boulders, it became clear that getting Surveyor down safely had taken more than ingenuity. "I think we were all aware that it was going to be a matter of luck," Shoemaker says.

For the most part, Surveyor's luck held. Six more missions followed; all but two were successful. For the program's climax in January 1968, Surveyor 7 made the riskiest landing of all, touching down in the rugged highlands next to the giant crater Tycho. Eighteen months later, when the Apollo 11 astronauts descended to the Sea of Tranquillity, Neil Armstrong had to take over manual control from the onboard computer, which was aiming for a giant, boulder-strewn crater. Today Gene Shoemaker marvels at the way things turned out. "Every time we landed blind with Surveyor and had a chance to land, we landed successfully," he says. "As luck would have it, you really had to have the astronaut there to land the sucker on [Apollo] 11. Surveyor would've been a gone gosling."

By the time of Apollo 11's success, NASA was planning to attempt a landing far beyond any astronaut's reach. Since 1962 the agency had been studying how to put a spacecraft on Mars. Everything about the idea overshadowed Surveyor's challenges, beginning with Mars' vast distance. The trip from Earth would span 10 months and more than 200 million miles, requiring a more self-reliant and more reliable spacecraft. Compared with all previous landers, any Mars lander worth sending would be not only more complex but heavier, and would necessitate a more powerful booster. The Martian gravity, about three times that of the moon, required the descending probe to withstand greater forces of deceleration. But to scientists, the Red Planet's pull was irresistible.

At the Langley Research Center, the effort was led by engineer Jim Martin, whose formidable presence and military-style crewcut won him nicknames like "the Prussian General." Viking needed a tough manager; in addition to being the most challenging robotic mission NASA had ever planned, the Mars landing was the most expensive.

Although the Viking landers were similar to their lunar predecessors, Martin's teams looked to the Apollo lunar module rather than Surveyor for technological hand-me-downs. Viking, like Apollo, would also use an orbiter from which the lander would be dispatched. Mars, however, has something the moon lacks: an atmosphere. From the Mariner Mars flyby probes, which had begun in the mid-1960s, scientists knew that the planet's carbon dioxide envelope was tenuous, with a surface pressure only a small fraction of that on Earth. Still, it was enough to require that Viking use a heat shield, followed by a parachute to decelerate. The tried-and-true combination of radar and vernier rockets would take care of the rest.

Even more troublesome than getting to the surface of Mars was keeping stowaways from going along. A spacecraft created to detect Martian microbes would have to be sterilized before leaving Earth. For Viking, that meant baking the entire lander for 40 hours at temperatures up to 234 degrees Fahrenheit. That played havoc with microelectronic components--and both landers were full of them, including a miniature biological laboratory in each. Just as vulnerable were the twin onboard computers, each possessing 18,000 words of memory in a container roughly the size of an overnight bag--a marvel by early-1970s standards. The entire descent to Mars would be controlled by one of those computers, but sterilization almost did them in; in one heat test after another the magnetic-wire memory failed. The computer occupied a spot on Jim Martin's infamous Top Ten List of problems for two and a half years, until engineers at Honeywell Aerospace finally perfected it.

In the end, Martin estimates, sterilization soaked up a quarter of the $930 million that the four Viking spacecraft cost all together--about $3 billion in current dollars. "They wanted the best," he says of NASA headquarters.

Even so, some inside the project feared that all that money, time, and effort might be for naught. The odds weren't promising. Not long after the Vikings left Earth in August and September of 1975, project scientist Gerry Soffen asked chief engineer Israel Taback what he thought the chances were of one lander getting down safely. When Taback estimated the odds at only 30 to 40 percent, Soffen says, "I was surprised they were that good!" He fully expected that Viking 1 would crash; then everyone would try to figure out what went wrong in time for Viking 2's attempt weeks later.

Jim Martin was more optimistic--but not much more. During a meeting with Viking scientists the following spring just before the spacecraft's encounter with Mars, Martin had said the odds of success were 50 percent. One scientist threw up his hands and wondered aloud why he had invested a decade of his life in a project with so little chance of succeeding. Martin explained that this was why there were two sets of spacecraft.

The Soviets knew the risks all too well. By 1976 they had tried as many as six times to place a lander on Mars without real success. In 1971 the Mars 3 lander reached the surface and transmitted for 20 seconds, then mysteriously died. Two years later Mars 7 missed the planet by 800 miles because of an internal malfunction; three days after that, Mars 6 crashed on the surface--and gave Viking the chance to make history.