Federal prosecutors say a Kentucky man has taken a plea deal after he admitted to plotting a mass shooting at a high school.

The U.S. Attorney’s Office for the Eastern District of Kentucky said Friday that 22-year-old Dylan Lee Jarrell has pleaded guilty to transmitting a threatening communication in interstate commerce, cyberstalking, lying to law enforcement officers and possessing a gun to commit violence.

FBI and Kentucky State Police investigators say Jarrell admitted in 2018 to beginning to plan and prepare to commit violence at Shelby County High School, which Jarrell previously attended as a student.

According to his plea agreement, Jarrell also developed an alternative plan over time to kill an individual identified as D.B. and then kill himself in a murder-suicide.

Background:Kentucky man wanted to be 'next school shooter,' officer says in court

From May 2018 to September 2018, Jarrell used Reddit and Instagram accounts to post messages about previous mass school shootings and to make threats, according to court documents.

Jarrell allegedly lied to an FBI special agent who visited Jarrell's Anderson County home in May 2018, stating he did not post the Reddit statement and was not aware of the Reddit account.

In August 2018 and September 2018, Jarrell purchased a semi-automatic rifle and obtained other items, including a bump stock, large capacity magazines, ammunition and body armor, according to prosecutors.

Jarrell acknowledged in his plea agreement to obtaining those items as part of his planned school shooting or alternate murder-suicide plot.

In October 2018, Jarrell admitted to sending two harrassing messages that contained racist and threatening statements to a mom in New Jersey, according to court documents.

Related:How a mom 700 miles away may have stopped a Kentucky shooting

After the New Jersey mom tipped off police about Jarrell's messages, a KSP trooper investigated further, and authorities with the FBI and state police went to Jarrell's home in Lawrenceburg the following day to ask him about the messages.

Authorities previously said they stopped Jarrell on Oct. 18, 2018, as he was pulling out of his driveway with "the tools necessary" in his car to carry out a mass shooting, including a rifle, 100-round magazine and more than 200 rounds of ammo.

Jarrell was arrested and gave officers his cell phone, which contained his plans to attack Shelby County High School and the individual identified as "D.B," according to the plea agreement.

Jarrell was indicted in May on three counts of threatening interstate communications, two counts of cyberstalking, one count of false statements and one count of possession of a firearm in furtherance of a crime of violence.

As part of the plea deal announced Friday, Jarrell instead faces one count each of those charges.

He faces up to fives years in prison on the threatening communication, cyberstalking and false statement charges and at least five years on the firearms charge that would run consecutive to the other offenses, prosecutors say.

Jarrell also faces a maximum fine of $250,000 for each count.

According to his plea agreement, Jarrell has requested that he would be housed at a federal prison in Lexington that allows him to receive mental healh counseling and treatment.

An attorney for Jarrell did not immediately respond to a request for comment.

“The FBI takes credible threats of violence seriously, and preventing mass causality events is a top priority. As the Jarrell investigation indicates, the FBI will work closely with the Kentucky State Police and our law enforcement partners to bring to justice those who issue these threats," said FBI Louisville Special Agent in Charge James Robert Brown Jr. in a statement. "I want to encourage the public to remain vigilant and to report this behavior to law enforcement immediately. In this instance, with the public’s help, the FBI and KSP saved lives."

Jarrell is scheduled to be sentenced April 1, 2020.

Reach Billy Kobin at bkobin@courierjournal.com or 502-582-7030. Support strong local journalism by subscribing today: courier-journal.com/subscribe.