A Kentucky school principal who once banned books with “homosexual content” from classrooms has been indicted on child porn charges.

Phillip Todd Wilson, 54, became infamous in 2009 when he banned LGBTQ-themed books, as well as others he deemed “soft pornography,” calling them “inappropriate” for students, according to the Louisville Courier Journal.

Wilson has now been charged with 11 counts of possession of matter portraying a sexual performance by a minor and six counts of promoting a sexual performance by a minor, according to the Winchester Sun.

He was arrested in August and indicted last Thursday, according to reports, which noted he was also fired as head of Clark County Area Technology Center in Winchester.

“You can’t make this s**t up,” author Jo Knowles — whose “Lessons from a Dead Girl” was one of the books Wilson banned — wrote on Facebook when the principal was arrested.

Laurie Halse Anderson, whose “Twisted” also was among the targeted books, highlighted the irony as well.

“Books that help kids examine the violence, abuse and shame they’ve endured are very threatening to the people who commit those acts of violence, abuse, and shaming,” she tweeted.

Other books on his list had included Chris Crutcher’s “Deadline” and “Unwind” by Neal Shusterman.

Wilson posted a $25,000 bond after his arrest, according to the Lexington Herald-Leader. A lawyer for him was not listed.