Updated

LOS ANGELES — The Mars rover Spirit will soon try to drive itself out of a sand trap where it has been stuck for the past six months.

NASA is set to outline plans to try to free Spirit, a risky process that could take months. Details of the extraction attempt will be announced later Thursday.

For the past several months, engineers have been busy testing different escape routes on Earth using prototype rovers. Spirit and its twin Opportunity landed on Mars in 2004 and have outlasted their primary three-month mission.

• SLIDESHOW: Mars Rover Spirit's best photos.

Recent "memory lapses" delayed NASA's efforts to extricate Spirit from its Martian sand trap. The rover has been mired in deep sand since April, unable to move.

While engineers try to free Spirit, its robotic twin Opportunity is headed toward a giant Martian crater called Endeavour. Earlier this month, Opportunity spotted a Martian meteorite dubbed Shelter Island on the heels of another space rock find — called Block Island — in September. The rover used its onboard instruments to study both meteorites.

Initially built for a 90-day mission, the two rovers have received repeated life extensions. Spirit is the older of the two rovers and has spent five years and nine months exploring Mars.