A Marine who staged his own disappearance during a hike in Colorado was discharged after pleading guilty Friday to deserting his unit for more than two years because he was suffering violent thoughts after serving in Iraq.

Lance Cpl. Lance Hering, 23, was ordered by a military judge to forfeit about $1,160 in pay and was sentenced to time already served. Hours later, Hering was discharged from the Marines and handed over to authorities from his hometown of Boulder, Colo.

Hering must return there to face charges of violating his probation from a 2004 attempted burglary conviction and a hoax he orchestrated in 2006 to convince the Marines he was either lost or dead in a Colorado park.

Hering had just returned from Iraq in August 2006 and was due back at Camp Pendleton the next month to train for a possible redeployment in 2007. Hering never returned, and he went into hiding with help from a friend who told police the Marine suffered a rock-climbing accident west of Boulder and wandered away.

The friend later admitted the disappearance was a hoax — but not before hundreds of people had scoured the landscape looking for Hering. The Marine was found in Washington state last month and charged with one count of unauthorized absence.

He could have been sentenced to 30 days in the brig, 45 days of hard labor and two months of confinement on the base.

During the hearing, Hering told the judge he fled the Marines because he suffered mental trauma while in Iraq. Eight Marines in his unit were killed during the deployment, dozens were wounded, and several others were accused of war crimes.

"Those were very dark days for me," Hering told a court-martial hearing officer. He said he suffered "disturbing images and violent thoughts" after serving in Iraq, according to a Los Angeles Times story.

Police arrested Hering last month at an airport in Port Angeles, Wash., after a tip from the Boulder County sheriff. He was with his father, Lloyd Hering, who was arrested for investigation of aiding and abetting. That charge was dismissed Tuesday.

The Marine's father claims he was flying his son to see a psychiatrist in Virginia and then to Texas to meet a lawyer who represents Marines in criminal cases.

Lance Hering's attorney, James Culp, said that an evaluation by military psychologists after his arrest determined he was suffering a "severe mental defect" during his deployment to Iraq.

Steve Powers, the friend who reported the disappearance, has said Hering wanted to get away because he feared harm from members of his own unit, the 3rd Battalion, 5th Marine Regiment. Some members of that unit were charged with killing an Iraqi civilian.

Hering "thought if he would have gone back to Camp Pendleton they would have killed him," Powers told the Daily Camera of Boulder in October 2006. "He was terrified."

Powers said he and Hering went to Eldorado Canyon State Park on Aug. 29 and found a place where Hering left some of his own blood to support the story Powers later told authorities — that Hering hit his head and was unconscious for hours while Powers hiked out to find help.

He said he then drove his friend to downtown Denver and returned to the state park, where he reported his friend had disappeared.

"He was definitely, absolutely convinced this was the only way he was going to survive," Powers said.