A former pilot accused of attempting to shut off the engines of a passenger jet mid-flight has pleaded guilty to the charges in a federal court.

Joseph David Emerson was riding off-duty in the cockpit of an Alaska Airlines flight when he told the pilots 'I am not okay' before trying to cut the engines midair, court documents showed.

Emerson also told police he had taken psychedelic mushrooms and had been struggling with depression.

Under his plea agreement, prosecutors can recommend a one-year prison sentence, while his attorneys are expected to argue for no additional jail time.

He pleaded no-contest to reckless endangerment and first-degree endangering an aircraft in Oregon state court, and guilty in federal court, according to CBS News. In the state court, he was sentenced to 50 days in jail, which he has already served, five years' probation, 664 hours of community service - eight hours for each person he endangered - and $60,659 (£44,907) in restitution.

What Joseph Emerson did was reckless, selfish, and criminal, said Multnomah County, Oregon, Deputy District Attorney Eric Pickard. We should remember how close he came to ruining the lives of not just the 84 people aboard Flight 2059, but all of their family members and friends as well.

In court on Friday, Emerson admitted he had been unable to perceive reality after taking the mushrooms but said, that doesn't make this right. He claimed the experience has made him a better father and a more responsible member of his community.

The incident on October 22, 2023, involved a flight from Everett, Washington, to San Francisco, California, carrying 80 passengers. The flight was diverted to Portland, Oregon, after the on-board incident, in which one pilot had to wrestle with Emerson.

After being subdued, Emerson reportedly told flight attendants: You need to cuff me right now or it's going to be bad and attempted to reach for the emergency exit handle during the descent. One flight attendant recounted that Emerson expressed remorse, saying he messed everything up and had "tried to kill everybody".

As part of his future rehabilitation, Emerson can serve half of his community service hours at Clear Skies Ahead, a non-profit for pilot health he founded with his wife after his arrest. He is also required to undergo drug and alcohol assessments and is barred from being near operational jets without permission from his probation officer.

Emerson's federal sentencing is scheduled for November 17.