MIAMI (AP) — Lawyers asked a civilian judge in Washington on Thursday to release a Marine Corps general detained at Guantanamo Bay for contempt of court.

The habeas corpus petition filed in U.S. District Court seeks to reverse a ruling which found that Brig. Gen. John Baker should be confined to quarters for 21 days and fined $1,000 for dismissing three defense lawyers in a terrorism case at Guantanamo without a military judge's permission.

Lawyers for Baker, who oversees the legal defense teams for prisoners charged with war crimes at the U.S. base in Cuba, argue that the military judge, Air Force Col. Vance Spath, did not have authority to detain the general since he is a U.S. citizen. They also say his conduct was appropriate and did not amount to contempt.

"We believe that Judge Spath's ruling was fundamentally flawed in a number of ways," Attorney Barry Pollack said.

Spath issued the ruling against Baker at a hearing Wednesday, shocking the general's colleagues by having him led out of the courtroom by guards and confined immediately to his quarters inside a small trailer on the base. A Pentagon official known as the convening authority must still approve the sentence, but could also void it. A decision was expected within days.

The dispute arose during the pretrial phase in the case of Abd al Rahim al-Nashiri, a citizen of Saudi Arabia and alleged senior member of al-Qaida who is accused of planning the 2000 attack on the USS Cole, which killed 17 crew members. Al-Nashiri could get the death penalty if convicted.

Baker excused three defense attorneys assigned by the Pentagon to defend al-Nashiri on ethical issues related to alleged breaches of attorney-client privilege. Officials have not disclosed details, saying the information is classified.

The general's decision to dismiss the lawyers disrupted scheduled proceedings at the base because the remaining defense lawyer said he lacked the experience necessary to continue. Spath declined to postpone al-Nashiri's hearing.

"He shouldn't be detained at all," Pollack said, referring to Baker. "He should be permitted to do the very important job that he has been assigned to do."

U.S. District Court Judge Royce Lamberth was expected to hold a hearing on the petition later Thursday.