In a robust ruling in favor of Abu Ghraib detainees, an appellate court ruled Friday that torture is such a clear violation of the law that it is “beyond the power of even the president to declare such conduct lawful.”

The ruling from a unanimous panel of judges on the Fourth Circuit Court of Appeals reinstates a lawsuit against a military contractor for its role in the torture of four men at the notorious prison in Iraq.

Last June, a district court ruled that a “cloud of ambiguity” surrounds the definition of torture, and that despite anti-torture laws, the decision to torture was a “political question” that could not be judged by courts.

That ruling echoed the widely discredited legal theories of the Bush administration, which argued that the war on terror gave the president the inherent authority to indefinitely detain and torture terror suspects, and conduct mass surveillance on Americans’ international communications.

But the Fourth Circuit soundly rejected that theory, saying that the United States has clear laws against torturing detainees that apply to the executive branch.

“While executive officers can declare the military reasonableness of conduct amounting to torture, it is beyond the power of even the president to declare such conduct lawful,” wrote appellate Judge Barbara Keenan, writing for the unanimous panel.

The case in question revolves around contractors from CACI Premier Technologies who participated in the interrogations of the four men in 2004, subjecting them to extreme temperatures, electric shocks, broken bones, death threats, and sexual abuse.

The Center for Constitutional Rights originally filed suit against CACI on behalf of the detainees in 2008. The company has been seeking to dismiss the lawsuit ever since, and this is the fourth time it reached the appeals court.

The plaintiffs and advocates at the Center for Constitutional Rights celebrated the decision.

“Torture is illegal and can never be a ‘policy choice,'” said Katherine Gallagher, a senior staff attorney with the Center for Constitutional Rights. “As the court made clear, neither the military nor the president — let alone a government lawyer — has the power to declare torture legal.”

Salah Hassan, one of the plaintiffs, said in a statement: “Today, part of justice was achieved and this is something wonderful, not only for me and the other plaintiffs, but for all the just causes in the world.”

The lawsuit will now go back to the district court for consideration of the detainees’ claims.

The CCR previously won a settlement in 2013 on behalf of 71 Ahu Ghraib detainees against L-3 Services, another military contractor at Abu Ghraib.

Top photo: A demonstrator from the organization Witness Against Torture wears an orange prison jump suit and a hood over her head as she sits in a cage during a demonstration in Lafayette Park outside the White House in Washington, DC, on Jan. 10, 2012.