A North Charleston police officer has been fired because he posted a photo of himself wearing Confederate flag boxer shorts.

Shannon Dildine, who was a sergeant and with the force since 1996, was sent a letter Wednesday from Police Chief Eddie Driggers detailing why the department let him go.

He was terminated because it was determined that the posting would make him incapable of effectively serving as a North Charleston officer.

“On Tuesday … the City learned that you posted on Facebook a photograph in which you were wearing only a pair of boxer shorts emblazoned with the image of the Confederate flag,” Driggers wrote. “Your posting in this manner led to you being publicly identified as a North Charleston Police officer and associated both you and the Department with an image that symbolizes hate and oppression to a significant portion of the citizens we are sworn to serve.”

Further, Driggers said, Dildine could compromise any criminal cases involving minorities because a defense attorney could use the photo to call into question his motivation in making an arrest.