Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A federal judge has denied a request from a detainee at the U.S. prison at Guantanamo Bay, Cuba, to stop hearings in his case even though all of the detainee's civilian lawyers have refused to take part, saying they think the government may be eavesdropping on attorney-client communications.

Judge Royce Lamberth of U.S. District Court in Washington, D.C., said Thursday that hearings at Camp Justice in Guantanamo must continue for Abd al-Rahim Hussein al-Nashiri, who is accused of bombing the USS Cole. According to McClatchy, the defense immediately responded with a motion alleging that Al-Nashiri is being unlawfully detained.

The Marine general who heads al-Nashiri's defense, and leads all defense teams at the military commission in Cuba, is still confined to a trailer behind Camp Justice after the judge in the case found him in contempt.

Brig. Gen. John Baker had excused the civilian attorneys from duty because of their concerns about surveillance. The judge found him in contempt Wednesday after he refused to rescind the excusal or testify about the absence of the civilian lawyers.

The judge, Air Force Col. Vance Spath, ordered Baker confined for 21 days in his quarters and fined him $1,000. A senior official at the Pentagon will review the contempt findings against Baker — the first at Guantanamo — and his sentence.

Karen Greenberg, a terrorism expert and author of a book about Guantanamo, said it's unknown what type of surveillance the defense is alleging, but there is past precedent. "We know that in the past … an FBI mole was put on the defense team. We know that there were CIA listening devices placed in the courtroom that even the judge didn't know about. … We know listening devices were found in rooms where defense attorneys and clients met."

In 2013, microphones had been discovered in the defense meeting rooms at Guantanamo, and the government confirmed that it had read some defense emails.

"We can't even imagine what is out there now," said Greenberg, who heads the Center on National Security at Fordham Law School.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The civilian defense attorneys defending al-Nashiri asked to be removed from his case on Oct. 6. The lawyers said that past and potentially ongoing surveillance of attorney-client conversations, as well as rules that made it hard to communicate with their client, rendered it impossible for them to represent him properly.

Brig. Gen. John G. Baker USMC

Brig. Gen. Baker had sent the chief prosecutor a memo on June 14 stating that he feared defense communications with clients might be compromised. Baker said he had information suggesting that surveillance had continued or been restarted. "I am not confident that the prohibition on improper monitoring of attorney-client meetings at GTMO as ordered by the commission is being followed," said Baker.

On June 23, the defense filed a classified motion that sought permission to give al-Nashiri information about the alleged intrusions into attorney-client communications. The nature of the alleged intrusions has not been specified in any unredacted public court documents.

Col. Spath denied the motion.

In July, defense tried to compel discovery of evidence related to alleged intrusions and asked for an evidentiary hearing. Col. Spath denied both motions in classified rulings.

Abd al Rahim al-Nashiri listens during his military commissions arraignment at the Guantanamo Bay detention center in Guantanamo, Cuba on Nov. 9, 2011. Janet Hamlin / AP file

When Baker then agreed to the defense attorneys' request to be released from duty, that left a single military lawyer, Navy Lt. Alerac Piette, representing al-Nashiri. The defendant could receive the death penalty if convicted, but Lt. Piette had never served on a capital case. The rules governing military commissions state that a defendant facing the death penalty must have counsel with prior experience in a capital case.

Col. Spath ordered the civilian attorneys to appear for proceedings in the al-Nashiri case on Sunday. When they did not, and Baker refused his subsequent orders, Spath found him in contempt.

Spath also ordered the civilian attorneys to continue representing al-Nashiri.

On Wednesday, al-Nashiri filed motions for an injunction and a temporary restraining order, asking for a halt in the proceedings. He asserted that continuation of the hearings without adequate legal representation would cause him to "suffer irreparable harm."

Investigators in a speed boat examine the hull of the USS Cole at the Yemeni port of Aden, after a powerful explosion ripped a hole in the Navy destroyer, killing at least 17 sailors and injuring some 30 others. Dimitri Messinis / AP, file

Al-Nashiri requested the "Court preserve the status quo by temporarily restraining Respondents from continuing these proceedings until the merits of his separately filed motion for a preliminary injunction is decided — specifically the merits of Petitioner's right to learned counsel claim."

With the stay denied, Al-Nashiri's civilian attorneys must also decide whether to obey Judge Spath's order to report to a location in Alexandria, Virginia at 8 a.m. Friday to participate in a hearing at Guantanamo by video link.

Al-Nashiri, an Al Qaeda leader, is accused of plotting the October 12, 2000 bombing of the USS Cole off the coast of Yemen. Seventeen American sailors died in the attack on the Navy destroyer.

The 52-year-old Saudi was captured in 2002. He was held in secret CIA "black sites" and subjected to waterboarding and enhanced interrogation before being transferred to Guantanamo in 2006.

A portion of Camp Justice in Guantanamo Bay, Cuba, April 7, 2014. Mladen Antonov / AFP - Getty Images file

As noted by the Miami Herald, Baker, the second highest ranking attorney in the Marine Corps, has been critical of the Guantanamo military commissions, which were set up after 9/11 to try terrorism defendants. In 2016, he referred to the system as "a farce."

In a statement, a Pentagon spokesperson said Judge Spath has the authority to exercise contempt power over "any person."

"The judge found that the Chief Defense Counsel's attempt to excuse three of the Accused's defense counsel … was not authorized under any rule, statute or regulation in any jurisdiction."