For 10 years the little ship silently orbited Mars, sending back images of the cratered planet below, and relaying signals from other probes sent to land in the red dust.
NASA hailed the Mars Global Surveyor as a rousing success -- a robot probe that actually spotted places where water may have spurted onto the Martian surface.
But in November, after a routine command from Earth to adjust its solar panels, the ship replied with a series of alarm messages, then indicated all was well -- and then mysteriously went silent.
Now NASA has completed a preliminary investigation, and concluded that the spacecraft died because of a computer error made five months before.
The investigation team said the Mars Global Surveyor -- MGS for short -- was done in by a small detail. The problem was one computer command sent last June by mission control, at the Jet Propulsion Laboratory in Pasadena, Calif.
Engineers did not realize it at the time, but they accidentally messed up the probe's ability to turn its solar panels, which must face the sun to generate electricity. When the command was sent in November to move them, it started a cascade of problems, which combined to kill the little ship.
First, thinking it could not turn its solar panels, MGS turned its entire body. As a result, batteries inside the probe -- meant to store power from the solar panels -- were now on a side facing the sun.
They quickly heated up, which only caused more trouble. The probe's computers thought the batteries were warm because they were fully charged. It shut them off. MGS probably lost all electrical power within 12 hours.
"It was a routine thing that was being done, but there were flaws in the process," said Dolly Perkins of NASA's Goddard Space Flight Center, who headed the investigation.
At the time of its arrival at Mars in 1997, MGS was overshadowed by the flashier Mars Pathfinder -- the first ship to land on Mars since 1976, and only the third ever. Pathfinder deployed a small rover, called Sojourner, that puttered around the landing sites, sniffed at rocks, and won the hearts of millions of Earthlings.
Meanwhile, MGS was scanning the planet from one pole to the other. Shortly before its final breakdown, it photographed gullies as it passed overhead; geologists said they had clearly been formed in just the last few years, perhaps by water spurting from underground aquifers.
NASA's mantra for its Mars missions was "follow the water" -- that would be a sign of whether Mars could ever have been a good place for life. MGS went looking for water, and successfully got its feet wet.
Did the taxpayers get their money's worth? NASA managers say the original budget to build the spacecraft was $156 million -- a hefty hunk of change, for sure, but a bargain by space-program standards. Assembly actually came in slightly under that.
Add money for the Delta rocket to launch it, and funding to keep it running during its mission, and the total comes to $377 million.
By its later years, NASA was running the MGS project for about $6 million annually; about 20 scientists and engineers worked on it part-time. In addition to images and other measurements of Mars, the ship scouted out landing sites for later probes and relayed their signals once they arrived.
The original plan called for MGS to last until around 1999, about two Earth years orbiting Mars. Instead, it worked for a decade.