A Tulsa, Oklahoma, police captain who refused to set foot in a mosque hosting a police appreciation ceremony was rightfully punished for disobedience, a federal appeals court has ruled.

Paul Fields had sued the city of Tulsa and its police department for infringing on his civil rights after he was suspended and docked 10 days' pay, transferred and relegated to the graveyard shift. He had been ordered to attend a thank-you function at the Islamic Society of Tulsa or send subordinates in his place, according to court records, but he claimed the request infringed on his religious beliefs. A district court ruled against him.

On Thursday the 10th U.S. Circuit Court of Appeals concurred with the original judgment, pointing out that if Fields felt attendance violated his religious rights, he could have gotten others to go instead of him. In addition, the court ruled, "No informed, reasonable observer would have perceived the order or the event as a government endorsement of Islam." The ruling notes that the department routinely attends "community building" events hosted by religious organizations.

According to court documents, the Tulsa Police Department had increased security at the Islamic Society and the school next door after a threat in 2010. The society hosted a buffet in March 2011 to thank law enforcement. Despite being assured that no officer would have to participate in any prayers, Fields -- who is described as a Christian by the legal group defending him -- told superiors he would not go and would not order subordinates to attend. About 150 TPD officers attended, court papers say, but none from Fields' shift.