Former Miami Dolphins and San Francisco 49ers offensive lineman Jonathan Martin will avoid prison time after agreeing to a plea deal on Friday related to a threatening Instagram post in February of 2018, per ESPN.

Three felony charges against Martin, 30, will be dropped in two years if he attends psychiatric appointments, alcohol counseling, and psychotherapy sessions.

The incident on Instagram occurred when Martin posted a picture of a shotgun and ammunition and tagged four accounts, including his former teammates, Richie Incognito and Mike Pouncey. The post included hashtags for his former high school, Harvard-Westlake and the Dolphins.

The caption read: “When you're a bully victim & a coward, your options are suicide, or revenge.” Martin was detained for questioning and was released shortly after putting up the post.

In a statement released Friday, Martin said:

“I am thankful that this matter has finally come to a conclusion. I want to apologize to my high school alma mater for my reckless and selfish actions,” Martin said in a statement Friday. “I am eager to put this matter fully in the rear view mirror and to continue forward with my life. I plan to eventually speak more candidly about mental health, substance abuse, and selfishness, and ultimately about perseverance & personal triumph.”

Via ESPN, the prosecutor said those tagged in the post supported the terms of the plea deal.

In 2013, Martin accused Incognito and Pouncey of bullying him when they were teammates. After an NFL investigation, it was found Incognito, Pouncey, and John Jerry created a hostile work environment for the offensive lineman. Incognito was suspended eight games for the incident. Martin hasn't played in the NFL since 2015.