A man convicted of sexually assaulting an 8-year-old boy will remain in prison after Maine's high court rejected an appeal arguing that the detective who interviewed him displayed "excessive friendliness."

Andrew Seamon's lawyer said Augusta police detective Tori Tracy was playing "good cop" when she secretly recorded an interview with Seamon, whom she had known for years.

The Kennebec Journal reports that Seamon testified he wasn't thinking rationally during the interview and had recently been treated for psychiatric issues.

The Maine Supreme Judicial Court ruled in a decision published Tuesday that Seamon's statements were voluntary regardless of the "friendly nature" of the interview.

Seamon was convicted of unlawful sexual contact. A jury cleared him of one count of gross sexual assault and deadlocked on a second count.