A Southern California county will allow jailed Muslim women to wear headscarves after settling a lawsuit with a woman who claims that deputies violated her religious freedom by making her remove her hijab.

The settlement agreement signed by the county last week and released Monday specifies that Muslim women must be provided a private area to remove their headscarves after arrest and must be provided with county-issued headscarves to cover themselves when they are in the presence of men.

The county, which did not admit wrongdoing, will also pay $45,000 in damages. Plaintiff Jameelah Medina will get $10,000 after subtracting attorney fees, said Hector Villagra, director of the Orange County office of the American Civil Liberties Union.

A spokeswoman for the Sheriff's Department did not immediately return a call Monday from The Associated Press.

Medina, 30, was arrested in December 2005 in Pomona for having an invalid train pass. She spent 12 hours in jail but was never prosecuted.

Medina, a business trainer who lives in Rialto, said that during processing she was forced to remove her headscarf in the presence of a male deputy even though she explained that to do so violated her religious beliefs.

"I felt exposed and vulnerable," she said. "I don't think I could have felt more naked even if I had no clothes on."

Medina and her attorneys said the settlement was important because it addressed the county's concerns about safety while respecting Muslims' religious beliefs.

"We had a concern about religious rights and they had a concern about safety. We met halfway to ensure that nothing like this will ever happen again," Villagra said.