WASHINGTON (CNN) -- Onetime top Bush administration officials received a break from the Supreme Court on Monday.

Robert Mueller, left, and John Ashcroft, seen in 2004, won't have to give depositions on detentions after 9/11.

A court ruling in their favor addresses the issue of whether they can be held personally liable for allegedly knowing of or condoning mistreatment against Muslim immigrants detained after the September 11, 2001, terrorist attacks.

A divided high court refused to allow former Attorney General John Ashcroft and FBI Director Robert Mueller to be subject to pretrial depositions -- called "discovery" -- in an ongoing civil lawsuit.

The appeal was brought by Javaid Iqbal, 41, arrested in New York two months after the 9/11 attacks as part of a broad sweep of hundreds of mostly Muslim immigrants in the New York area. Most were held on alleged immigration violations, while federal investigators tried to determine if any had links to terrorism plots.

Iqbal was never charged with a terrorism offense, although he was convicted of fraud for having false papers and eventually, nearly six years ago, was deported.

He later filed a series of lawsuits against top Bush officials alleging that he was beaten by guards during his six-month detention in solitary confinement, and that officials personally condoned isolating Muslim and Arab immigrants in a Brooklyn prison wing.

"The complaint does not show, or even intimate, that [top officials] purposely housed detainees in the [federal prison] due to their race, religion, or national origin," said Justice Anthony Kennedy for the conservative majority. "All it plausibly suggests is that the nation's top law enforcement officers, in the aftermath of a devastating terrorist attack, sought to keep suspected terrorists in the most secure conditions available until the suspects could be cleared of terrorist activity."

Ashcroft and Mueller were among those personally sued. They have denied considering religious beliefs or ethnicity in holding and segregating anyone after the terror attacks.

The government said a ruling in the Iqbal case would be a "blueprint" in the future for establishing a "plausible" argument of wrongdoing before top officials could be subject to civil liability.

A federal appeals court had ruled for Iqbal, but suggested the lawsuit against Mueller and Ashcroft be put on hold until after questioning of some of the 32 other lower-level government workers named in the suit, to see if any evidence of high-level involvement was uncovered. That gave the divided Supreme Court the opportunity to rule narrowly on the specific facts of the case, without a clear-cut rule on personal liability for Cabinet-level officials and lawmakers.

The high court ruling threw the case back to the lower courts to decide whether Iqbal can file a new, revised lawsuit that would meet legal scrutiny.

In dissent, Justice David Souter said "there is no principled basis for the majority's disregard of the allegations linking Ashcroft and Mueller to their subordinates' discrimination."

The 69-year-old justice, who is retiring next month, said Iqbal made clear his case when "he alleges that [top officials] helped to create the discriminatory policy he has described." Souter was supported by Justices John Paul Stevens, Ruth Bader Ginsburg and Stephen Breyer.

Iqbal, who remains in Pakistan, claimed in his lawsuit he was taunted with verbal abuse over his religion by prison staff, and given random strip searches. He also alleges physical abuse, including being thrown against a wall, punched in the head, and kicked in the stomach. Iqbal was cleared of any terrorist involvement, but did plead guilty to fraud, leading to his deportation.

The Justice Department's Office of Inspector General issued a report in 2003 that found "significant problems" -- including physical mistreatment and verbal threats -- over the treatment of immigrant detainees such as Iqbal at the Brooklyn prison facility.