A Marine who vanished from his military base in Iraq in 2004 and was later shown in captivity in a video on Islamist militant Web sites was found guilty on Monday of desertion after spending most of the past decade in Lebanon.

Cpl. Wassef Ali Hassoun, 34, was found guilty of deserting with intent to avoid hazardous duty and desertion with intent to remain away permanently, said Marine Capt. Stewart Coles, a spokesman at Camp Lejeune, N.C., where the trial took place. Hassoun also was found guilty of losing government property — a 9mm M9 pistol that authorities said he had when he disappeared.

The Marine was sentenced to two years in prison, a reduction in rank to private, forfeiture of all pay and allowances and a dishonorable discharge, Coles said. Hassoun faced up to 7½ years of confinement.

Hassoun, a member of the human exploitation team with 2nd Battalion, 2nd Marines, of Camp Lejeune, disappeared from Camp Fallujah, Iraq, in June 2004. He was initially believed to have been killed by insurgents, after an online video surfaced showing him blindfolded. Militant Web sites reported that he had been beheaded.

But Hassoun reappeared at the U.S. Embassy in Lebanon a month later, in July 2004, and insisted that he had not abandoned his unit. The Marine Corps charged him with desertion in December 2004, and Hassoun vanished again the following month, failing to to return to Camp Lejeune after taking leave to see his family in Utah, authorities said.

Before disappearing a second time, Hassoun held a news conference at Marine Corps Base Quantico, Va., saying that he was not a deserter and had been kidnapped.

Hassoun’s attorney, Haytham Faraj, said in an interview with Checkpoint in August that Hassoun actually was kidnapped by insurgents when he disappeared in Iraq in 2004. When he disappeared for the second time in December 2004, he went to visit family in Lebanon, but stayed too long, the lawyer said.

A Marine official with knowledge of the investigation into Hassoun’s initial disappearance said it is still unclear how we was able to get to Lebanon alive in summer 2004, but his belongings were found in the house of a known insurgent group in the Jolan section of Fallujah. The video is believed to be real, but it was unknown whether Hassoun was working with insurgents or they helped with his escape.

The Marine Corps charged him with desertion again and labeled him as a fugitive, prompting an Interpol warrant for his arrest, Hassoun’s lawyer said. The Lebanese government told Hassoun that he was not allowed to leave the country, Faraj said.

The Marine Corps announced last summer that Hassoun had been transferred into military custody in the United States.

This piece has been updated to include additional reporting.