Religious groups and some civil libertarians were often at odds during the last Supreme Court term, but they have found common ground on a religious freedom case that the justices will take up as one of their first orders of business in October.

It involves a quarter-inch of facial hair.

Gregory Houston Holt is an Arkansas prison inmate who is also known as Abdul Maalik Muhammad. According to his brief to the court, he feels his Muslim faith requires him to follow this dictate: “Allah’s Messenger said, ‘Cut the moustaches short and leave the beard (as it is).’ ”

Holt said he is willing to compromise with prison officials and keep his beard trimmed to one-half inch. But Arkansas corrections officials allow beards only for dermatological conditions — not religious beliefs — and even then they must be trimmed to one-quarter inch.

Of such, Supreme Court cases are made.

Holt’s case first drew attention because he brought it to the Supreme Court himself, filing a handwritten plea.

His cause has since been embraced by the Becket Fund for Religious Liberty, which was a leader in last term’s cases freeing private employers who objected because of their faith from providing coverage of certain contraceptives under the Affordable Care Act . He is represented by Douglas Laycock, a University of Virginia law professor and leading expert on religious legal issues.

Holt’s case has attracted an outpouring of support from groups who divided last term on important Supreme Court cases involving the health-care act and whether local government meetings could open with sectarian prayer.

In this case, conservative legal organizations such as the Alliance Defending Freedom and the Rutherford Institute are on the same side as Americans United for the Separation of Church and State and the American Civil Liberties Union.

And Holt has the support of the Obama administration. Arkansas officials, according to a brief filed by Solicitor General Donald B. Verrilli Jr., have “failed to explain why they cannot adopt the less restrictive means adopted by nearly every other jurisdiction in the country.”

Arkansas is supported by a handful of other states that say beards are prohibited or that such decisions are up to prison officials, not judges.

Prison officials go to some length to present Holt as more dangerous than devout. In their brief, they say he once threatened to kidnap President George W. Bush’s daughters and frequently threatens “jihad” against his enemies. He is serving a life sentence for slitting the throat of a former girlfriend and stabbing her in the chest.

Corrections officials say that beards can be hiding places for contraband — razors, for instance, or sim-cards for cellphones. Or that allowing certain prisoners to have beards creates situations where some are seen as “leaders” and others are not. Or that a man with a beard could change his appearance more easily simply by shaving should he escape.

They found a sympathetic federal judge and a panel of the U.S. Court of Appeals for the Eighth Circuit, who in a short opinion said the federal law that protects the religious rights of prisoners still provides deference to prison officials on matters of security.

Still, even the federal magistrate who held a hearing in Holt’s case said, “I look at your particular circumstance and I say, you know, it’s almost preposterous to think that you could hide contraband in your beard.”

Holt and his supporters note that Arkansas has never found a case of a prisoner hiding contraband in a beard and that they acknowledge it would be far easier to hide objects in clothes or even the hair on top of a prisoner’s head. Perhaps, they say, being clean-shaven might be more of a risk.

“Respondents cannot issue thousands of razors to prisoners and then claim to fear that part of a razor blade might be smuggled into prison in a half-inch beard,” Laycock wrote.

He also said it was not enough, as lower courts indicated, that prison officials accommodate some of Holt’s religious requirements, such as providing him a pork-free diet and allowing him to order religious materials.

“Presumably, this would work in reverse: if they let him grow his beard, maybe they could feed him pork every day,” Laycock wrote.

Laycock said the federal law at issue, the Religious Land Use and Institutionalized Persons Act of 2000, was passed expressly to protect religious practice from the whims of state and local officials.

It says that a substantial burden on a prisoner’s exercise of religion can be justified only if it is the least restrictive means to further a compelling government interest. That is essentially the same test that the court ruled the contraceptive mandate failed under a related law, the Religious Freedom Restoration Act.

Americans United for the Separation of Church and State is one of the groups supporting Holt that was on opposite sides of conservative legal groups in the legislative prayer and contraceptive mandate cases.

Gregory Lipper, an attorney for the organization, said the difference is that the previous cases would affect third parties, such as those who don’t want to hear prayers at municipal meetings or employees who want access to all forms of birth control.

Holt’s request for a beard imposes no burden on any other inmate or anyone else, Lipper said. His group urges the court to make sure that when government accommodates the needs of an individual’s religious beliefs, it does so in a way “conditioned on the equal rights of others.”

Lipper said he thinks it is a “relatively simple case.” What is more surprising than his organization’s support for Holt, he said, is the silence of some groups that were active in last term’s cases. He suggested they were more vocal about the rights of Christians than religious minorities.

Holt v. Hobbs will be argued on Oct. 7.