Lawyers for a U.S. soldier accused of deserting his unit in Iraq last year argued that he walked away partly to avoid orders to abuse Iraqi prisoners.

Staff Sgt. Camilo Mejia (search), an infantrymen with the Florida National Guard (search), is charged with desertion after failing to return to his unit in Iraq after a two-week furlough in October.

His attorneys spent Wednesday, the first day of Mejia's court-martial, asking a military judge to allow testimony from witnesses who could support Mejia's claim that his unit was ordered to abuse detainees.

But the judge ruled that only Mejia himself could raise the abuse issue before a military jury of officers and enlisted men that will begin hearing the case Thursday.

Mejia, 28, faces a year in prison and a bad-conduct discharge if convicted of desertion. Military law defines desertion as leaving the military with no intention to return or to "avoid hazardous duty or to shirk important service."

"I can only say, whatever I did, I did because I felt like I had an obligation — moral and in some cases legal," Mejia told reporters outside the courtroom.

Ramsey Clark, a former U.S. attorney general and one of Mejia's lawyers, said Mejia's unit was ordered to use sleep-deprivation tactics with blindfolded Iraqi detainees, in at least one instance by cocking a pistol next to their heads.

Clark, attorney general under President Lyndon B. Johnson, said Mejia was protected by international law to avoid duties that would have constituted war crimes. He compared Mejia's claims of prisoner mistreatment to the abuse scandal at the Abu Ghraib prison in Iraq.

"The United States is seeking to court-martial soldiers in (Iraq) for outrageous abuses at the same time it prosecutes a soldier halfway around the world because he did what he had a duty to do under international law," Clark said.

Capt. A.J. Balbo, the lead prosecutor, argued that even if Mejia saw prisoners abused in Iraq that would not justify fleeing the Army for five months.

"This is about a soldier who deserted, who ran away," Balbo said. "While he went into hiding, he never raised these issues. Instead, he buried them in his conscientious objector (search) packet."

After returning in March to Fort Stewart, Mejia applied to become a conscientious objector, saying his experiences in Iraq had made him opposed to war.

While he said publicly that he became upset after seeing Iraqi civilians hit by gunfire during an ambush on his unit, he never mentioned witnessing abuse of Iraqi detainees. He instead described those allegations in his objector application, filed March 16.

Mejia's objector application claims he saw Iraqi prisoners treated "with great cruelty" when he was put in charge of processing detainees last May at al-Assad, an Iraqi air base occupied by U.S. forces.

Ordered to keep prisoners awake for up to 48 hours, soldiers would sometimes bang on walls with a sledgehammer, Mejia wrote, or would "load a 9 mm pistol next to their ear."