That case, Rasul v. Rumsfeld, alleged that Defense Secretary Donald H. Rumsfeld and the chain of command had established a regime at Guantánamo that systematically humiliated and abused detainees when they tried to practice their religion. In an attempt to break these people, guards threw Qurans in the toilet bucket, blasted rock music to interrupt prayers and forced prisoners to pray with their genitals exposed.

To me, the case seemed open-and-shut. The Religious Freedom Restoration Act (R.F.R.A.), which was passed in 1993, prohibits the government from “substantially” burdening “a person’s exercise of religion” unless it serves some important government interest that cannot be accomplished in any other way. My clients were “persons”; throwing Qurans in the toilet bucket certainly made it difficult for them to worship; and it served no governmental interest to humiliate people who were praying.

The Federal District Court in Washington, which first heard the case, agreed that “R.F.R.A. expressly protects the religious exercise of ‘persons,’ a broadly applicable term, commonly including aliens.” But the government appealed and the United States Court of Appeals for the District of Columbia Circuit held that, as aliens held outside the United States, these men were not “persons” after all. The Bush administration had put them offshore precisely to ensure this.

Even the arch-conservative Judge Janice Rogers Brown, who once said that “in the heyday of liberal democracy, all roads lead to slavery,” was uncomfortable, noting in concurrence, “It leaves us with the unfortunate and quite dubious distinction of being the only court to declare those held at Guantánamo are not ‘persons.’ This is a most regrettable holding in a case where plaintiffs have alleged high-level U.S. government officials treated them as less than human.”

The case went to the Supreme Court twice. The first time the court ordered the court of appeals to reconsider the case, which it duly did, reaching the same conclusion. The second time the Supreme Court declined to hear the case and the appeals court decision remains the law.

So while Muslims in United States custody do not have redress from the coarsest attacks on their religious dignity, corporations do have religious rights that the law protects. Why were my clients, undeniably actual people, abused when they worshiped, while state-chartered artificial entities were allowed an exemption from the law in deference to the religious beliefs of their shareholders?

One possibility is that detainees are excluded because they are aliens outside the United States. But the Supreme Court held in 2008 in Boumediene v. Bush, again with a 5-to-4 vote, that detainees at Guantánamo did have the constitutional right to habeas corpus. To rule otherwise, Justice Kennedy wrote, would be to hold that the “political branches have the power to switch the Constitution on or off at will” based on where the executive has chosen to bring prisoners. Under this reasoning, the Constitution should be a backpack that travels with governmental authority and protects those subject to American custody.