FORT MEADE, Md. — A military judge denied a Guantanamo detainee’s attempt Thursday to remove his defense counsel, ending two weeks of legal sparring that derailed the trial of the accused 9/11 plotters.

Army Col. James Pohl ruled that Walid bin Attash, suspected of aiding hijackers in the September 2001 attacks, couldn't give good cause as to why his attorney of the past four years, Cheryl Bormann, should be dismissed from the pretrial proceedings underway at the military commission at Naval Station Guantanamo Bay, Cuba, and simulcast at Fort Meade.

"Based on what you told me yesterday you have failed to meet that burden at this time," said Pohl in his ruling to bin Attash. "I will not terminate Ms. Bormann's representation of you."

Bin Attash is on trial with four other alleged 9/11 planners, including Khalid Sheikh Mohammad, who is said to be the mastermind behind the attack.

The ruling prevented a further headache for the years-long military tribunal. Bin Attash originally stymied these latest proceedings by requesting his rights to self-representation. One week later, on advice from his counsel, Bormann, bin Attash backed off self-representation — in favor of firing and replacing her. He said he can no longer trust Bormann's defense.

The bearded bin Attash, dressed in a beige jacket and taqiyah, calmly accepted Pohl's ruling, but requested advice on what he could do if his defense team filed a motion or took some other action that he disagreed with. Pohl attempted to brief bin Attash on his rights but realized sorting out the legal complications likely would have to wait until the next scheduled hearings in December.

"It's just not a simple yes-or-no answer," Pohl said. "We'll come back to it."

The government fought in court to learn bin Attash's reasons for wanting to fire Bormann, which were divulged to the judge in a closed hearing Wednesday afternoon.

"The accused [bin Attash] suddenly decided to drop on this commission a week or so ago a complete derailment of matters which will affect the speed of the case going forward," prosecutor Ed Ryan said. "It affects everything in this courtroom and it certainly affects the United States of America."

Bormann, who wears a black abaya out of respect for bin Attash's Muslim faith, said sharing that information would negatively affect her client.

"They really don't have a dog in this fight," said Bormann of the government's wish to hear bin Attash's reasons. "The government's interference and request for knowledge about what may or may not have transpired during that [discussion] is not appropriate."

The sharing of classified information has been an albatross for the court. For example, the commission has struggled to determine what information, especially classified documents, can be shared between detainees and their defense teams.

"We have so many problems in the camp that take precedence over anything that they are discussing here in court. We are still in the black sites," said bin Attash, speaking directly to judge Pohl through a translator.

Testimony will continue on Friday and then will resume in December.