A divided federal appeals court Friday threw out a lawsuit by the former chief military prosecutor at Guantanamo Bay against his former boss at the Library of Congress, who fired the ex-prosecutor for publicly criticizing the Obama administration over Guantanamo detainees.

Retired Air Force Col. Morris Davis sued his then-boss, Daniel Mulhollan, in his individual capacity, and against the Library itself, or technically the Librarian of Congress James Billington, in his official capacity. A lower court judge rejected motions by Mulhollan and Billington to throw out the case; Mulhollan appealed that ruling, which was reversed by the appeals court Friday. The suit against Billington as the official head of the Library of Congress continues.

Davis made his critique in op-ed articles in The Wall Street Journal and The Washington Post in 2009. Responding to the administration's decision to try some Guantanamo detainees in federal courts and others in the military commissions system, Davis argued there should be one equal system for all.

The government argued that Davis violated his responsibility as a high-level official at the Congressional Research Service, a division of the Library of Congress that produces objective nonpartisan reports to lawmakers, when he spoke out publicly against the administration's policy. In his suit, Davis said the government violated his constitutional right to free speech.

The U.S. Court of Appeals for the District of Columbia Circuit instructed the lower court to dismiss the litigation against Mulhollan. The appeals court said that while the Supreme Court, in Bivens v. Six Unknown Named Agents of Federal Bureau of Narcotics, gave federal courts discretion to allow actions against federal officials for violations of constitutional rights, that did not apply here.

"As the Supreme Court has made clear, in most instances the judgment has been that Congress, not the judicial branch, is in the best position to prescribe the scope of relief available for the violation of a constitutional right," Chief Judge David Sentelle wrote in an opinion for court joined by Judge Karen LeCraft Henderson. Both were appointed by Republican presidents.

Sentelle wrote that the Supreme Court has said: "We have accordingly held against applying the Bivens model to claims of First Amendment violations by federal employers."

In her dissent, Judge Judith Rogers noted that Davis' suit alleged that Mulhollan asked Davis to "acknowledge that . . . the First Amendment . . . did not apply" to the two op-ed pieces that led to his firing.

Rogers cited U.S. District Judge Reggie Walton's finding that the supervisor Mulhollan "was at least aware of 'a general constitutional rule already identified in the decisional law.'" Rogers was appointed by Democratic President Bill Clinton.

Davis left the military in 2007 after 25 years of service. In the final two years, he oversaw the prosecution of suspected terrorists at Guantanamo Bay, and that led him to believe the system was flawed by a lack of defendants' rights and by political interference.