Steven Slater talks to Larry King on October 26 at 9 p.m. ET on CNN's "Larry King Live."
New York (CNN) -- A former JetBlue flight attendant -- who reportedly cursed a passenger over a plane's public address system, deployed the plane's emergency evacuation slide, and used it to dramatically exit a flight at JFK airport in August -- pleaded guilty to two counts of attempted criminal mischief as part of a plea deal with prosecutors.
Steven Slater pleaded guilty to second-degree attempted criminal mischief, a felony, and fourth-degree attempted criminal mischief, a misdemeanor. Under terms of the plea deal, he must enter a yearlong mental health program. During the program, he must take assigned medications and not get arrested. If he does not comply, he could receive between one and three years in jail.
If he successfully completes the program, Slater can apply after one year to vacate the guilty plea to the felony charge and will receive a year of probation, according to terms of the plea deal. He must also pay $10,000 in restitution to JetBlue, the cost of repairing or replacing the chute.
"I want to thank everyone for their support and kindness that got me through to this day," Slater said after the hearing. "The public interest in this was surprising, unexpected and encouraging. At the end of the day, I am a grown adult and must accept responsibility for my actions. Therefore, I am looking forward to moving forward with my life and I'm very grateful to the court for making these arrangements which allow me to do so."
JetBlue suspended Slater immediately after the August 9 incident and he resigned from the airline last month.
Terms of the deal were announced and Slater entered the plea Tuesday in Queens Supreme Court.
Slater defense attorney Daniel Horwitz said last month he was negotiating a plea deal with Queens prosecutors. "We look forward to resolving this matter amicably with the district attorney," Horwitz said.
And Queens District Attorney Richard Brown had said his office is considering "an alternative sentencing program, at the defendant's request."
Brown initially charged Slater with reckless endangerment, criminal mischief and criminal trespass, all of which could theoretically carry a seven-year sentence in prison. Slater at first pleaded not guilty.
Slater's first court-appointed attorney had said a passenger hit Slater on the head with either the overhead bin or luggage, triggering his outburst. But some passengers who were on board the flight raised questions about that account.
Slater's apparent "Take this job and shove it" action generated hundreds of thousands of fans on the internet. Hollywood public relations veteran Howard Bragman agreed to represent Slater amid speculation the former flight attendant's notoriety could lead to a television contract.
"The court is the first issue," Bragman told CNN. "I want to resolve that and then we'll deal with the rest."
CNN's Allan Chernoff contributed to this report.