CHARLESTON, S.C. (WCBD/AP) – A former South Carolina police officer fired after a photo of him posing in Confederate flag underwear appeared online has settled a wrongful termination lawsuit.

North Charleston city spokesman Ryan Johnson said Friday the state Insurance Reserve Fund settled the lawsuit with Shannon Dildine at mediation for $55,000. No city funds were expended on the settlement, Johnson added.

Dildine was fired after posting the photo online in June 2015, days after nine worshippers were shot at Charleston’s Emanuel AME Church.

In his suit against the city, Dildine said he hadn’t known shooter Dylann Roof was seen in photos glorifying the Confederate flag. Dildine, who is white, also said the city discriminated against him. He said a black officer wasn’t disciplined for posing with Black Lives Matter protesters.

The city said Dildine’s picture was inflammatory and showed poor judgment.