California has settled a lawsuit filed by a man who was barred from becoming a prison guard because he refused to shave the beard required by his Sikh religion, officials said Thursday.

Civil rights organizations said the Department of Corrections and Rehabilitation's policy amounts to religious discrimination. They say the state makes exceptions for men with certain medical conditions and should make similar allowances for Sikhs, Muslims, Orthodox Jews and others whose religion requires facial hair.

Under the settlement, the state will not change its rules requiring most men to be free of facial hair so they can be fitted for gas masks. But it is paying Trilochan Oberoi $295,000 in damages and giving him a $61,000-a-year job as a manager in the corrections department.

The 63-year-old, who once served in the Indian Navy, has worked at a Walmart store while he fought a six-year battle to become a guard at Folsom State Prison east of Sacramento.

The department's policy since 2004 has been that gas masks must fit tightly to protect correctional officers from tear gas and pepper spray sometimes used to quell inmate uprisings. However, the policy allows beards up to an inch long if a doctor verifies that a guard has a skin disorder or irritation.

San Francisco attorney Harmeet Kaur Dhillon, who represented Oberoi on behalf of the Sikh Coalition, said she is disappointed the state refused to change its policy but promised to keep fighting such restrictions by both state and local law enforcement agencies.

"Our community has a long-standing tradition of being involved in law enforcement and the military," Dhillon said. "It's a matter of pride and honor, and a lot of Sikhs would be signing up for these jobs if the prejudices were swept away."

Oberoi felt he had the law on his side, based on several court and administrative rulings in his favor, she said, but feared he might have lost at trial in part because people often mistake him and other Sikhs for Muslims because of their turbans and unshorn beards.

"There's a lot of prejudice against Sikhs after 9/11," Dhillon said. "Who can say what would happen before a jury?"

Civil rights groups had petitioned Gov. Jerry Brown and Attorney General Kamala Harris to change the department's policy. However, Brown's office declined comment and Harris fought the lawsuit in her capacity as the state's lawyer representing the corrections department.

Harris spokeswoman Lynda Gledhill wouldn't comment Thursday, referring questions to the corrections department.

Corrections spokeswoman Dana Toyama said she couldn't comment because the department is reviewing its regulations to make sure they conform to state occupational safety and health rules.

Oberoi earns barely more than minimum wage as a Walmart cashier but has no guarantee of job security at the corrections department, Dhillon said. The department recently sent out 26,000 layoff warnings as it downsizes under a new law that shifts responsibility for lower-level criminals to counties.

Dhillon said less than a third of Oberoi's settlement will go to lawyers who represented him during a four-year fight in court and before the California State Personnel Board.

Oberoi sai vigils were being planned Thursday night in other cities.

Elsewhere, officials took steps to close some camps that sprang up since the movement began last month against what protesters see as corporate greed and a government that caters to the wealthiest and big business.

In Nashville, Tenn., officials imposed a curfew for a camp at the Capitol complex. In Providence, R.I., officials notified protesters that they were violating laws prohibiting camping overnight at a park.

Some tea party groups complained of a double standard, saying they were charged fees to hold their rallies while Occupy groups have not. One group in Richmond, Va., is asking the city to repay $8,000 spent for permits and other needs.

On Thursday, however, most of the talk was of Olsen and who was responsible for his injury.

The group Iraq Veterans Against the War blamed police. Police say they used tear gas and bean bag rounds, not flash grenades and rubber bullets as some demonstrators have charged.

Interim Oakland police Chief Howard Jordan said Wednesday that the charges of excessive use of force are being investigated. He did not return repeated calls seeking comment on Thursday.

Olsen's condition improved on Thursday, with doctors transferring him from the emergency room to an intensive care unit. Shannon said Olsen is scheduled for surgery to relieve pressure from brain swelling. His parents were flying to Oakland from Wisconsin, his uncle said.

"His mother, this is obviously a heartbreaker to her," said George Nygaard, also a Marine veteran, said. "I don't think she understands why he was doing thien a big piece of what we do here and our growth strategy, so obviously it's pretty devastating for us that he's in the shape he's in," said Jeff Garon, the company's director of marketing.

Olsen had been helping to develop security applications for U.S. defense agencies, building on expertise gained while on active duty in Iraq, Garon said.

Olsen was awarded seven medals while serving in the U.S. Marine Corps, which he left as a lance corporal in November 2009 after serving for four years. One of them was the Navy-Marine Corps Achievement Medal.

Olsen moved to the Bay Area in July, and quickly found friends in the veterans against the war group. The lanky man with a dry sense of humor did not show a lot of interest in politics as a teen -- he has two tattoos for the group "Insane Clown Posse" on his upper arms, Shannon said.

His tours of duty in Iraq made him more serious, Shannon said.

"He wasn't active in politics before he went in the military, but he became active once he was out ... the experience in the military definitely shaped him," Shannon said.