The Idaho Court of Appeals has thrown out a black man’s sex crime convictions, saying the prosecutor interjected race in closing arguments by quoting lyrics from the Confederate anthem “Dixie.”

All three judges agreed that Canyon County Deputy Prosecutor Erica Kallin erred in citing a song praising what the judges called pernicious racism that might have influenced the jury.

In April 2013 James D Kirk, then 45, was sentenced to 20 years in prison after the jury found him guilty of committing lewd conduct against a 17-year-old girl and sexually battering a 13-year-old girl. Both teenagers are white.

Canyon County spokesman Joe Decker tells the Idaho Statesman the county will retry the case if the Idaho attorney general doesn’t appeal the 19 December appeals court ruling.