Updated

A U.S. Army officer on Tuesday defended her decision to use female guards at Guantanamo Bay's top-secret Camp 7, where Muslim prisoners say contact with unrelated women is an affront to their religion.

The officer, a former commander of Camp 7 whose name was not disclosed, told a court at the base in Cuba that she started to use women to transport prisoners in 2014 due to a shortage of guards with the proper training and security clearance amid an increased demand to move men about the detention center for legal meetings and hearings before judges.

That move prompted outrage among some of the prisoners in Camp 7, including the five men facing trial by military commission for their alleged roles planning and supporting the Sept. 11, 2001, terrorist attack. Lawyers for the men said they began refusing to attend meetings or to cooperate with their defense, making the issue yet another obstacle in long-stalled legal proceedings against the men.

Female guards work regularly in the two main camps of the Guantanamo Bay detention center but have less physical contact with the prisoners. There are a total of 107 prisoners held at the base.

The judge overseeing the Sept. 11 case issued a temporary order in January halting the use of women in Camp 7, where only male guards had been used until 2014. Military officials are now asking him to reverse the ruling, arguing that it discriminates against female soldiers and impedes camp operations.

The former officer testified by video link from Massachusetts, where she has served with the state National Guard for 33 years and worked as a police officer for 21 years. She had never run a detention center before being appointed commander of Camp 7, which holds such prisoners as Khalid Sheikh Mohammed, the self-proclaimed architect of the Sept. 11 attack and other alleged terrorists.

She said she consulted with a detention center cultural adviser before using women guards to transport prisoners and was told it would be OK because guards were touching male prisoners as part of their duties. She said the military made an effort to accommodate the men's religious beliefs in general.

"Any inquiry, especially when it was linked to their religious practices, was reviewed thoroughly," she said.

Lawyers for the men argue that being physically handled by women not only violates their deeply held Muslim beliefs but is also traumatic for men who were subjected to what they say were brutal CIA interrogations that amounted to torture. They say it's also relatively easy to find alternatives.

A need for equality of the sexes, "doesn't mean you can't respect their religious rights and work around it," said James Harrington, a lawyer for defendant Ramzi Binalshibh.

The judge, Army Col. James Pohl, was hearing testimony on the female guard issue on the first of four scheduled days of pretrial hearing the Sept. 11 case. The five prisoners face charges that include terrorism and nearly 3,000 counts of murder in violation of the law of war and could get the death penalty if convicted.

A judge in a separate war-crimes case, against alleged al-Qaida commander Hadi al-Iraqi, previously issued an order against female guards handling him in Camp 7 but later rescinded it at the urging of prosecutors and the military.