In a few days, a robot vehicle no bigger than a golf cart will complete its analysis of a small patch of red Martian soil. Then it will turn south to continue a journey that will become the longest overland trek ever made on another world.

Opportunity is one of a pair of six-wheeled robots that have been trundling across Mars since 2004. In that time, Opportunity and its partner, Spirit, have uncovered vital information about the planet's past and shown that, although apparently sterile and barren today, Mars was once Earth-like, with a thick atmosphere and plenty of water.

The small probes, which will mark their fifth anniversary on Mars this month, have helped to transform our knowledge of the Red Planet. Yet each was designed to survive there for only three months, a startling 20-fold increase in operating life that was hailed by scientists at Nasa last week.

"We were surprised when we reached our first year on Mars, but now we have got used to it," said John Callas, the project's manager at Nasa's Jet Propulsion Laboratory in California. '"I don't see any reason why they cannot go on for years to come."

Spirit and Opportunity touched down, encased in huge inflated airbags, on 3 and 24 January 2004 respectively, and have since sent back more than a quarter of a million photographs, survived dust storms, descended into craters and, in one case, climbed a mountain. Opportunity has operated continuously without a hitch, while Spirit suffered one major glitch two years ago when a wheel jammed. However, the little rover has still managed to move around fairly well on its remaining five wheels.

For both craft, the unexpected high winds on Mars were a major contribution to their longevity, for they have prevented dust from settling on their solar panels and allowed them to maintain their power supplies.

"As for the loss of the wheel on Spirit, that turned out to be a stroke of luck," added Callas. "It created a furrow behind the rover and, when we looked at those tracks, we found that Spirit had uncovered a patch of very pure silicon rock that we have subsequently discovered was laid down aeons ago by an ancient hot spring. It was a key piece of evidence to support the idea that water flowed over the surface of Mars billions of years ago."

After Venus, Mars is Earth's closest planetary neighbour and for much of the 19th and 20th centuries was assumed to be the home of alien life forms. The alien invaders in HG Wells's War of the Worlds were Martians, for example. Then in 1976, two US Viking robot probes landed on Mars and showed that it was a rocky, hostile world with a painfully thin atmosphere and no water on its surface. The prospects of finding life there were rated as almost zero.

But recent research projects - with Spirit and Opportunity in the vanguard - have since shown that Mars, although grim today, once had oceans, rivers and a thick atmosphere. These discoveries raise two key questions: did primitive life get a chance to evolve before catastrophe struck Mars and, if so, does it still lurk beneath the planet's surface? And second, what happened to Mars? Why was an Earth-like world abruptly turned into a desert planet?

These are key questions that now dominate the investigation of the planet and experiments aimed at finding answers will form the core of future missions. The scientists who were involved in the design and construction of Spirit and Opportunity are already working on a new, more sophisticated and far larger follow-up mission: the Mars Science Laboratory.

This probe - the size of a Mini Cooper, according to Callas - will be launched next year and is scheduled to reach the Red Planet in 2012. It will be capable of moving around the surface, while stopping to drill into the Martian soil in search of organic material. It will also be fitted with sensors for detecting chemicals in the atmosphere, in particular methane, whose presence will be another indicator that complex organic reactions are occurring on the planet.

"The Mars Science Laboratory will provide us with a lot more important information although, in the end, the only way we will know unambiguously that there is, or was, life on the planet is to bring back samples of Martian soil and rock to Earth - although that will require a mission that will involve a fleet of spacecraft, capable of rendezvousing in space, will be very expensive and will take at least another decade for us to get ready for," added Callas.

In the meantime, Spirit and Opportunity will continue to trundle on their separate ways across the red deserts of Mars. Spirit is now heading for a promising rocky outcrop nicknamed Goddard by Nasa scientists. "It might be a volcanic crater, and that is something that we haven't seen before," said Steve Squyres of Cornell University, a principal investigator for the mission.

Meanwhile, Opportunity has already left Victoria Crater, which it has been investigating for the past two years and is now heading towards an even larger crater, Endeavour. "We may not get there, but scientifically it is the right direction," added Squyres.

This point was backed by Callas. "It's a trip of around 13 kilometres, longer than Opportunity's entire journeying to date," he said. "The main problem will be knowing when to stop the rover and when to keep going - like a long-distance car trip on Earth. You cannot halt at every place that looks interesting. You won't reach your destination. On the other hand, if we saw a dinosaur bone sticking out the ground that would be worth taking a look at, I suppose.

"Certainly, the trip to Endeavour is ambitious but given what these rovers have done already, I am confident Opportunity will succeed."