Updated

Prison officials can ban employees from wearing religious headscarves out of concerns they pose a safety risk, a U.S. appeals court in Philadelphia ruled Monday in a split 2-1 decision.

Prison officials have legitimate concerns the headscarves can hide drugs or other contraband, or be used by an inmate to strangle someone, the majority said.

The ruling dismisses a lawsuit filed by the U.S. Equal Employment Opportunity Commission on behalf of three Muslim women employed at the Delaware County Prison in suburban Thornton. The EEOC had said they were being forced to compromise their religious beliefs to keep their jobs.

The suit was filed against the Geo Group, a Boca Raton, Fla.-based contractor that formerly operated the facility.

After the prison implemented a ban on hats and headscarves in 2005, nurse Carmen Sharpe-Allen was fired for refusing to remove her headscarf, or khimar, at work. Intake clerk Marquita King and correctional officer Rashemma Moss, after some deliberation, agreed to remove their headscarves on the job.

U.S. District Judge John P. Fullam had dismissed the EEOC lawsuit, and two of three judges on the appeals panel agreed with him. They called it a close call, but said the prison's need for order trumped the women's right to wear the religious attire at work.

"The EEOC has an enviable history of taking steps to enforce the prohibition against religious discrimination in many forms," U.S. Circuit Judge Dolores K. Sloviter wrote. "On the other hand, ... a prison is not a summer camp and prison officials have the unenviable task of preserving order in difficult circumstances."

An EEOC spokeswoman said the agency was disappointed by the decision and was reviewing its options.

Prison officials had argued that baseball hats, headscarves and other head coverings make it difficult to identify people and can be used to hide drugs and other contraband. Lawyer Walter F. Kawalec III, who argued the case for the Geo Group, did not immediately return a call for comment.

In his dissent, Justice A. Wallace Tashima, a senior judge the 9th U.S. Circuit, said the Geo Group had not been made to prove that the use of headscarves by employees posed an undue burden.

In a related case, the U.S. 3rd Circuit ruled last year that Philadelphia police could likewise bar a female officer from wearing a headscarf under her police hat.