The off-duty US pilot who tried to shut down the engines of a plane mid-flight over the weekend had taken magic mushrooms and thought he was having a nervous breakdown, court documents showed Tuesday. Pilots wrestled Joseph Emerson out of the cockpit on Sunday after he lunged for handles that would have starved the engines of fuel and turned the plane into a glider. Emerson, who told police he had not slept in 40 hours, also tried to open an emergency exit in the rear of the aircraft and had to be restrained by the cabin crew during an emergency landing. “I pulled both emergency shutoff handles because I thought I was dreaming and I just wanna wake up,” Emerson told police, according to a criminal complaint. Emerson and the investigating officer “talked about the use of psychedelic mushrooms, and Emerson said it was his first time taking mushrooms.” The 44-year-old was arrested on Sunday evening after the Alaska Airlines flight made an emergency landing in Portland, Oregon. Emerson had boarded the flight — which was operated by Horizon Air — between Everett, Washington, and San Francisco, sitting in the jump seat of the cockpit, in line with airline policy for non-working staff. A short way into the flight, after chatting with the pilots “Emerson attempted to grab and pull two red fire handles that would have activated the plane’s emergency fire suppression system and cut off fuel to its engines,” the Department of Justice said. “After a brief physical struggle with the pilots, Emerson exited the cockpit.” Alaska Airlines said Monday that pilots had reacted quickly to reverse the handles, and the aircraft had landed safely. “Flight attendants placed Emerson in wrist restraints and seated him in the rear of the aircraft,” the Department of Justice said. “During the flight’s descent, Emerson tried to grab the handle of an emergency exit. A flight attendant stopped him by placing her hands on top of his.” The US Attorney’s Office for the District of Oregon said Emerson faces a federal charge of interfering with flight crew members and attendants. He has also been charged in Oregon with 83 counts of attempted murder, 83 counts of reckless endangerment and one count of endangering an aircraft. Live ATC, a website that archives conversations between pilots and air traffic controllers, published an audio recording of the moments after the incident. “We’ve got the guy that tried to shut the engines down out of the cockpit,” the pilot said. “And he doesn’t sound like he’s causing any issue in the back right now. “I think he’s subdued. Other than that, yeah, we want law enforcement as soon as we get on the ground and parked,” the pilot said. Alaska Airlines said Tuesday that Emerson had been “removed from service indefinitely and relieved from all duties”. A Germanwings plane on a flight from Barcelona to Dusseldorf was intentionally crashed by a pilot in March 2015, killing all 144 passengers and six crew members on board.