WASHINGTON  A federal appeals court on Wednesday ruled that former prisoners of the C.I.A. could not sue over their alleged torture in overseas prisons because such a lawsuit might expose secret government information.

The sharply divided ruling was a major victory for the Obama administration’s efforts to advance a sweeping view of executive secrecy powers. It strengthens the White House’s hand as it has pushed an array of assertive counterterrorism policies, while raising an opportunity for the Supreme Court to rule for the first time in decades on the scope of the president’s power to restrict litigation that could reveal state secrets.

By a 6-to-5 vote, the United States Court of Appeals for the Ninth Circuit dismissed a lawsuit against Jeppesen Dataplan Inc., a Boeing subsidiary accused of arranging flights for the Central Intelligence Agency to transfer prisoners to other countries for imprisonment and interrogation. The American Civil Liberties Union filed the case on behalf of five former prisoners who say they were tortured in captivity  and that Jeppesen was complicit in that alleged abuse.

Judge Raymond C. Fisher described the case, which reversed an earlier decision, as presenting “a painful conflict between human rights and national security.” But, he said, the majority had “reluctantly” concluded that the lawsuit represented “a rare case” in which the government’s need to protect state secrets trumped the plaintiffs’ need to have a day in court.