A federal appeals court has upheld a Texas prison inmate's right to a beard and skullcap as required by his religious beliefs.

A unanimous ruling by a three-judge panel of the 5th U.S. Circuit Court of Appeals in New Orleans upheld a lower-court ruling that David Rasheed Ali should be allowed to grow a 4-inch beard and wear a knit skullcap, called a kufi, as his faith demands. Ali is a Muslim inmate at the state's Michael Unit in East Texas near Palestine (PAL-uh-steen).

In a 32-page opinion filed Monday, Appeals Judge Edward Prado wrote that the Texas ban on inmates having 4-inch beards and religious headwear outside a cell or religious service violates a 2015 U.S. Supreme Court ruling.