Updated

Joseph Daniel Hudek IV has issued an excuse for why he lost control on a Delta flight this summer: He was super high.

Hudek, who was arrested in July for trying to pry open an exit door on his flight from Seattle to China, and also for assaulting the passengers and flight attendants who tried to restrain him, told a federal magistrate judge on Tuesday that he consumed edible marijuana before the flight, which caused his outburst.

ESCAPED POODLE DELAYS 14 FLIGHTS AT TOKYO AIRPORT

"My understanding is that it was legal to buy and consume marijuana in [Washington] state," Hudek wrote in an affidavit, per the Tampa Bay Times. "After purchasing the edible marijuana, I ate it."

"I have never had a remotely similar incident in all my times of flying on an airplane," he added.

delta aftermath ap

This Friday, July 7, 2017 photo taken the FBI and released via the U.S. Attorney's Office in Seattle shows the aftermath of a cabin on Delta Flight 129 from Seattle to Beijing. (FBI via U.S. Attorney's Office in Seattle via AP)

Hudek’s doctor, too, attested in an affidavit that cannabis could induce "paranoia, confusion, hallucinations and combativeness" in users.

This, along with other statements from Hudek’s friends, family and two more physicians, was evidently enough to persuade Magistrate Judge James Donohue, of Washington, to release Hudek, 23, to the custody of his mother in Tampa, reports The Seattle Times.

There’s a catch, however. Hudek is not allowed to fly back to Tampa, and must instead drive or travel by train. He is also not allowed to use marijuana.

PICS: AMERICAN AIRLINES CANCELS FLIGHT AFTER CARGO CATCHES FIRE ON TARMAC

Hudek first made headlines this summer, after causing a disturbance aboard a July 6 flight from Seattle to Beijing. Authorities say Hudek left his seat about an hour into the flight, while the plane was over the Pacific Ocean, just northwest of Vancouver Island. He then entered the restroom, exited to ask a question of the flight attendant, re-entered the restroom, and later re-emerged with his shirt off, according to documents obtained by the Tampa Bay Times. He then lunged for the exit door, screaming, “I want to get out!”

Flight attendants and passengers tried to subdue Hudek as he actively fought them off, punching a flight attendant and hitting another passenger on the head with a wine bottle. A crew member also claimed to have broken a wine bottle over Hudek’s head, which apparently didn’t faze the 23-year-old.

"Hudek did not seem impacted by the breaking of a full liter red wine bottle over his head, and instead shouted, 'Do you know who I am?' or something to that extent," remembered a flight attendant shortly after the incident.

FOLLOW US ON FACEBOOK FOR MORE FOX LIFESTYLE NEWS

Hudek was eventually restrained by several passengers and crew. He was handed over to police at the Port of Seattle upon landing back at Seattle Tacoma International Airport, and charged with interfering with a flight crew.

Hudek is due back in court for a trial on Feb. 22, 2018. If convicted, he faces up to 20 years in prison for assault, and up to 10 years for other charges, reports The Seattle Times.