California's attorney general said religious beliefs are not enough to trump a corrections department ban on prison guards wearing beards - a stance that drew protests from civil rights organisations.
Attorney general Kamala Harris argued in a Sacramento County Superior Court filing on January 6 that Trilochan Oberoi can not be properly fitted for a gas mask if he keeps the facial hair required by his Sikh religion.
Ms Harris said no exceptions have been granted since the policy took effect in 2004. She is asking that Mr Oberoi's lawsuit be dismissed at an April 19 hearing.
Civil rights organisations sent a letter to Ms Harris asking her to reconsider her opposition and met with her top aide to discuss their concerns.
They said the Department of Corrections and Rehabilitation's own regulations allow guards to wear beards for certain medical conditions and should make similar allowances for Sikhs, Muslims, Orthodox Jews and others whose religion requires facial hair.
"Why should those who cannot shave for religious reasons be treated differently from those who cannot shave for medical reasons?" reads the letter from groups including the Asian Law Caucus, American Civil Liberties Union of Northern California, Council on American Islamic Relations - California, Sikh Coalition, Asian American Bar Association and Bay Area Association of Muslim Lawyers.
Thirty-two organisations sent a similar letter to Governor Jerry Brown.
Corrections spokeswoman Peggy Bengs said gas masks need to fit tightly to protect correctional officers from tear gas and pepper spray sometimes used to quell inmate uprisings.
However, she said department policy is to allow beards up to an inch long if a doctor verifies that a guard has a skin disorder or irritation.
The 22-page filing by Ms Harris said the exemption applies only to guards who passed the gas mask fitting test before the policy took effect six years ago and later grew their beards.