KANSAS CITY, Kan. — A 20-year-old running for a state House seat in Kansas who admitted to circulating revenge porn was charged five years ago with threatening to shoot a high school student, according to newly released records.

Aaron Coleman was 14 in May 2015 when he was charged with a felony, making a criminal threat, according to police and court records show obtained by The Kansas City Star. He later pleaded guilty to a misdemeanor charge of harassment, the newspaper reported.

The Kansas Democratic Party disowned Coleman in August after an ex-girlfriend said he physically abused her last December and is backing a write-in campaign by seven-term state Rep. Stan Frownfelter, who narrowly lost to Coleman in the primary. No Republican is on the ballot, but Republican Kristina Smith also launched a write-in campaign.

Coleman, a community college student and dishwasher who has been running on a liberal platform, defended himself in a text message to The Star, writing, "I find it insane to use someone's juvenile record to distract from the fact Republicans and Democrats are engaging in full on class warfare right here in Wyandotte County and keeping people trapped in poverty in order to maximize profits."

He told The Associated Press on Saturday in a text that Frownfelter shouldn't have been "lazy" and stressed that the allegations were old.

"I was a troubled kid, and you're on a witch hunt," he wrote. "People are sick of it. Moving on."

According to a police report and arrest warrant affidavit obtained by The Star through an open records request, the school threat investigation began after a Kansas City, Kansas, police officer stationed at Turner High School learned that Coleman had sent a text message to someone saying, "Imma go up to the THS and shoot her then myself." The messages went on to say, "My life is ruined and I just want to die."

Coleman, who was not a student at the school, acknowledged that he wrote the message and said it was true that he wanted to hurt himself, but he said he never intended to harm or shoot the girl and didn't have access to firearms, according to the police report.

Coleman, who left the Turner School District in May 2012 and was being home schooled, said he went into a "panic attack" after the girl posted a photo of his genitals on Facebook, the report said. He said that he wanted her to believe he was "crazy" so she would remove the photo, the police report said. The girl's mother told police that her daughter feared for her safety.

In addition to the abuse accusations involving his ex-girlfriend, Coleman admitted in a Facebook post in June that allegations that he had posted revenge porn online and blackmailed and harassed middle school girls were true. He wrote that he had been "a sick and troubled 14-year-old boy." He has not publicly addressed the allegations made by his former girlfriend.

It wasn't immediately clear if the case involving the threatening text message was handled in juvenile court or was moved to adult court. Coleman declined to discuss specifics, a spokesman in the prosecutor's office didn't immediately respond to an email and police weren't immediately able to respond to a records request. The Star wrote that it discovered the arrest and charges during a search of Kansas court records and requested supporting documents.