The Mars rover (search) Opportunity resumed rolling freely across the Martian surface Saturday after scientists freed it from a sand dune where it had been mired for nearly five weeks, NASA (search) officials said.

Engineers at the Jet Propulsion Laboratory (search), which manages the mission, cheered when images beamed back to Earth showed the rover's wheels were free.

"We've got a working rover on Mars that cost $400 million to build and ... keep working," project manager Jim Erickson said. "I'd like to wear it out rather than lose it."

A photograph taken by Opportunity and posted on the laboratory's Web site showed the long tracks of its wheels crossing a featureless dune.

Opportunity's wheels started slipping April 26 during a planned 295-foot trip. While trying to drive over a foot-high sand dune, the robotic explorer stopped moving, its wheels hub-deep in soft soil.

Engineers spent weeks with an Opportunity mock-up figuring out what commands to give the robot to free it, but the maneuvers took time. The rover inched forward less than a foot in a month, losing most of its traction every time it tried to roll.

"It's kind of like we were swimming through it," Erickson said.

But on Saturday morning, data showed that Opportunity was free at last and had moved several feet across the dune.

Erickson said engineers want to be sure the rover will not encounter any more patches that could trap it again. It will be Monday or Tuesday night before a test drive is ordered, he said.

Opportunity and its twin rover, Spirit, have been exploring opposite sides of Mars since landing in January 2004. Both rovers have long outlasted their primary, three-month missions.