(Reuters) - A U.S. appeals court on Friday ruled that an inmate in Louisiana who is a Rastafarian can keep dreadlocks he has been growing for about six years as a part of his religion after the state demanded he cut them to adhere to prison grooming policies.

A three-judge panel from the New Orleans-based U.S. Court of Appeals for the Fifth Circuit ruled the inmate, Christopher Ware, “met his burden to show that the grooming policies substantially burden his sincere religious beliefs.”

Ware argued the grooming policies violated the U.S. Religious Land Use and Institutionalized Persons Act (RLUIPA), which allows for reasonable accommodations when possible for inmates to maintain their religious beliefs.

The Louisiana Department of Corrections (DOC), a defendant in the suit, is reviewing the court’s decision and exploring its options, department spokesman Ken Pastorick said in an email.

The appeals court said the department did not provide adequate reasoning why it could not make an accommodation in this case for the inmate.

“We conclude that DOC failed to meet its burden under RLUIPA of showing both that its grooming policies serve a compelling interest and that they are the least restrictive means of serving any such interest,” the judges said.

Ware, who was convicted of sexual battery in 2014, began practicing the Rastafarian faith, which is based in Jamaica, in 2011 or 2012, according to court documents.