By Paul Rincon
BBC News science reporter
A glitch has forced Nasa's Mars Global Surveyor (MGS) spacecraft to shut down its science instruments.
Mars Global Surveyor was launched in November 1996 (Image: Corby Waste/Nasa)
The spacecraft has switched into a "safe mode", in which the instruments and some other systems are turned off.
Team members are racing to get the probe out of this mode so it can photograph the presumed crash site of a US Mars mission lost in 1999.
The pictures could decide whether design changes are needed on a probe due to launch for Mars in 2007.
Next week will provide the last opportunity to take images of the crash site of Mars Polar Lander (MPL) for another two years.
Some unexplained switching back and forth between Global Surveyor's main onboard processing computer and its back-up forced the craft into the safe mode.
In this mode, MGS turns off its science instruments but leaves many other systems on.
The spacecraft also turns towards the Sun to get the maximum charge possible on its batteries, and it communicates with Earth on its low-gain antenna only.
On 30 July, the main onboard processing computer unexpectedly switched to its back-up computer. Then, on 26 August, the back-up computer switched back to the primary computer, which had been re-booted in the meantime.
"[The primary computer] was left in its safe mode. It was powered, but when the back-up computer switched back to it, the whole spacecraft went into safe mode," Thomas Thorpe, MGS project manager from Nasa's Jet Propulsion Laboratory in California, told the BBC News website.
Mr Thorpe said that both computers had now been re-booted and that the back-up computer had come out of safe mode into the less drastic contingency mode.
On Sunday, the primary computer is expected to move into contingency mode, too.
This will allow communication to be re-established over the spacecraft's high-gain antenna.
Engineers have been testing failure scenarios on a duplicate of the spacecraft's computer at JPL.
Current ideas include increased solar activity affecting the spacecraft and a problem with the upload of commands, but no "smoking gun" has been found.
Mars Global Surveyor was launched in November 1996 on a mission to study the Red Planet's surface features, atmosphere and magnetic properties.
It completed its primary mission in January 2001, so the spacecraft has far exceeded its planned lifetime.
It has continued to return fantastic science data from the Red Planet and has provided support for the recent Mars Exploration Rover missions.
"It's getting to be a fairly old spacecraft and it's been having a number of issues; none of them are considered life-threatening," said Professor Phil Christensen, who is principal investigator on MGS's thermal emission spectrometer instrument.
"The spacecraft's operating fine; they can command and communicate with it. The poor engineers will work hard over the weekend and we'll be back on track early next week," he told the BBC.
On 10 September, the spacecraft will have its last opportunity for two years to photograph the crash site of Nasa's Mars Polar Lander mission, in a bid to learn more about what happened during the last minutes of its descent to the surface.
"The whole MPL site is at very high latitude and is not in sunlight for very long. After 10 September, it will be in darkness for the next two years," said Mr Thorpe.
MPL failed to establish radio contact with Earth as it was supposed to after a self-controlled touchdown near the edge of Mars' southern polar cap on 3 January 1999.
Earlier this year, scientists found telltale signs of a crash site, with evidence of wreckage and possibly a parachute in images taken by Global Surveyor.
Another spacecraft called Phoenix, which is due to launch for Mars in two years' time, will make use of software and hardware designed for the MPL mission.
It is understood that Phoenix team leaders could consider design tweaks depending on what can be seen in images to be taken in a week by Global Surveyor.
By using MGS's so-called C-Proto capability, the spacecraft's Mars Orbiter Camera (MOC) will be able to image the site at high-resolution.
C-Proto works by rolling the spacecraft at the same rate it is flying over a target.
In this way, scientists can get a surface resolution of 50cm per pixel as opposed to 1.5m per pixel. But the field of view of the camera is very small at this resolution, so the spacecraft's position has to be predicted to about 30 milliseconds a week in advance.
"All of this is coming to a head this week, and we're racing to get the spacecraft online to make use of this last opportunity," said Mr Thorpe.
Controllers want to get the spacecraft out of safe mode as quickly as possible because it can use up to 10 times more fuel than it would during its normal operating mode.