A former Chicago Police detective shown in a photo posing as a hunter who bagged a black teenager as a trophy should not get his job back, an Illinois appellate court has ruled.

Timothy McDermott had appealed the decision of a Cook County judge, who in 2014, upheld the detective’s firing for appearing in the photo.

Then-Police Supt. Garry McCarthy, who had asked the Chicago Police Board to fire McDermott, called the photo “disgusting.”

Also posing in the photo was Officer Jerome Finnigan, who is serving a 12-year prison term for corruption.

The U.S. attorney’s office had obtained the 2002 photo during a criminal investigation of Finnigan and other officers accused of participating in a robbery ring. The feds turned over the photo to the Chicago Police Department in 2013.

A state appellate court on Friday upheld the police board’s firing of McDermott for violating three department rules: bringing discredit on the department; disrespect of a person; and unnecessarily displaying a weapon.

“We raised some important legal arguments concerning the department’s burden of proving its case with sufficient and competent evidence, especially in situations where the employee has character and an unsullied work history such as Tim’s,” said McDermott’s lawyer Daniel Herbert.

“We respect the court’s decision,” Herbert added. “This is a chilling example of how a dedicated and accomplished career can be brought down by a 10-second decision made more than a decade earlier.”

Illinois Appellate Justice Eileen O’Neill Burke, who wrote the opinion upholding McDermott’s firing, said the police board’s decision wasn’t arbitrary or unreasonable.

After the photo surfaced, police officials said they were unable to identify the teenager wearing antlers in the photo, but last year the Chicago Sun-Times discovered that he was Michael Spann, a 17-year-old whom McDermott had arrested in 2002 on misdemeanor marijuana charges. Spann was killed in a 2007 drive-by shooting.