WASHINGTON, Sept 11 (Reuters) - A federal appeals court on Friday dismissed a lawsuit against two U.S. defense contractors by Iraqi torture victims, saying the companies had immunity as government contractors.

The lawsuit was filed in 2004 on behalf of Iraqi nationals who say they or their relatives had been tortured or mistreated while detained by the U.S. military at the Abu Ghraib prison.

The plaintiffs sued CACI International Inc

CACI.N

, which provided interrogators at Abu Ghraib, and L-3 Communications Holdings Inc's

LLL.N

Titan unit, which provided interpreters to the U.S. military.

By a 2-1 vote, the appellate panel found the two companies had government contractor immunity and the claims were preempted, based on a 1992 U.S. Supreme Court ruling and other precedents in the national security and foreign policy areas.

"During wartime, where a private service contractor is integrated into combatant activities over which the military retains command authority, a tort claim arising out of the contractor's engagement in such activities shall be preempted," Judge Laurence Silberman said in the ruling.

Judge Merrick Garland dissented. "No act of Congress and no judicial precedent bars the plaintiffs from suing the private contractors -- who were neither solders nor civilian government employees," he said.

"The plaintiffs in these cases allege that they were beaten, electrocuted, raped, subjected to attacks by dogs and otherwise abused by private contractors working as interpreters and interrogators at Abu Ghraib prison," Garland wrote.

Attorneys representing the victims and their families had argued the contractors were not immune because the alleged torture at the prison fell outside the scope of the work they had agreed to perform.

A federal judge in 2007 dismissed the claims against Titan because the translators performed their duties under the direct command and exclusive operational control of the military.

But the judge ruled the lawsuit against CACI could go forward because its interrogators were subject to a dual chain of command involving company and military officials, with significant independent authority retained by CACI supervisors.

The appeals court disagreed and ruled that claims against both companies must be dismissed. (Editing by Todd Eastham)