Nov. 10 (UPI) — The New York Police Department has agreed to no longer force women to remove hijabs for mug shots as part of a settlement of a federal lawsuit.

At issue, was a lawsuit filed two years ago by two Muslim women, Jamilla Clark and Arwa Aziz, who claimed they were embarrassingly forced to remove their hijab headscarves for mug shots after being arrested on low-level charges for violating orders of protection that were later dismissed.

“No one should be forced to undress just to be fed into a facial recognition database,” the women’s lawyer and founder and executive director of the Surveillance Technology Oversight Project Albert Cahn said in a statement. “New Yorkers are able to get a drivers’ license or passport while wearing the hijab, and there’s absolutely no reason for it to be removed by police.”

The New York Police Department agreed in a settlement filed last week to change its policy to allow Muslim women who wear the headscarves to conform to Islamic standards of modesty to keep the hijab on during police photographs as along as their faces are unobstructed. The agreement applies to not only hijabs, but also other religious head coverings, such as burqa, turban, or wigs worn by Orthodox Jews.

“It was appalling that this was happening for many years in New York and that our city was betraying the values of religious inclusion,” said the women’s lawyer Albert Fox Cahn. “But now we won’t see any more New Yorkers subjected to this discriminatory policy.”

The NYPD also agreed to train officers to “take all possible steps, when consistent with personal safety,” to allow prisoners to keep their religious headwear on to protect “privacy, rights and religious beliefs.”

According to the settlement, there is an exception for searches for weapons or contraband.

The police department also agreed to keep track of any incidents when prisoners were forced to remove religious headwear over the next three years.

The two women who filed the lawsuit alleged that the NYPD violated their constitutional rights, including the First Amendment, Fourth Amendment and Fourteenth Amendment, and the rights of other people in their same situation. The settlement left outstanding monetary claims for damages.

“Now that the NYPD has agreed to end the policy, they still need to go a step further,” Cahn added in his statement. “That’s because this settlement doesn’t address the thousands of New Yorkers who were subjected to this unlawful policy. That’s why we’re still fighting in court to make sure the NYPD pays for the harm its already inflicted.”

Patricia Miller, chief of the Special Federal Litigation Division of the New York City Law Department, said in a statement Monday that the settlement was “a good reform” for the NYPD.

“It carefully balanced the department’s respect for firmly held religious beliefs with the legitimate law enforcement need to take arrest photos, and should set an example for other police departments around the country,” Miller said.