PORTLAND, Ore. (AP) — An off-duty pilot riding in the extra seat in the cockpit of a Horizon Air passenger jet tried to shut down the engines in midflight and had to be subdued by the crew, according to a pilot flying the plane.

Authorities in Oregon identified the man as Joseph David Emerson, 44. He was being held Monday on 83 counts each of attempted murder and reckless endangerment and one count of endangering an aircraft, according to the Multnomah County Sheriff’s Office.

The San Francisco-bound flight on Sunday diverted to Portland, Oregon, where it was met by officers from the Port of Portland, who took Emerson into custody.

Seattle-based Alaska Airlines, which owns Horizon, a regional carrier, did not name Emerson, but said Monday that the threat was posed by one of its pilots who was off duty but authorized to occupy the cockpit jump seat.

The airline said the captain and co-pilot reacted quickly, “engine power was not lost and the crew secured the aircraft without incident.” Alaska said in a statement that no weapons were involved.

One of the pilots told air traffic controllers that the man who posed the threat had been removed from the cockpit.

“We’ve got the guy that tried to shut the engines down out of the cockpit. And he — doesn’t sound like he’s causing any issue in the back right now, and I think he’s subdued,” one of the pilots said on audio captured by LiveATC.net. “Other than that, we want law enforcement as soon as we get on the ground and parked.”

The FBI office in Portland said it was investigating “and can assure the traveling public there is no continuing threat related to this incident.”

The Federal Aviation Administration said it was helping law enforcement investigations, but declined further comment about the incident.

FAA records indicate that Emerson has a valid license to fly airline planes. The Associated Press tried to reach his family members but was unsuccessful. The Multnomah County sheriff’s office, district attorney’s office and public defender’s office did not immediately respond to inquiries about whether Emerson had an attorney to comment on his behalf.

The FAA, in an alert to airlines, said a jump-seat passenger tried to disable the engines by deploying the engine fire-suppression system.

“It is not hard to activate the fire handles — you want them to be accessible in case of an engine fire,” said John Cox, a retired airline pilot and now a safety consultant. He said it is possible to restart the engines once the fire handles are returned to their normal position.

“This is an extremely rare event. In 53 years, I have never heard of a jump-seat rider attempting to shut down engines,” Cox said. He said the third pilot can be invaluable in cases where a crew must deal with a complex situation.

Jeffrey Price, an aviation-security expert at Metropolitan University of Denver, said airlines must approve people who sit in the jump seat, but the pilots working the flight can deny access.

The vetting of crew members is based on trust, he said, and the last line of defense is what happened on the Horizon plane — “crew members physically preventing someone from taking over the flight controls. The system worked, fortunately.”

Airlines use the third seat to accommodate pilots who need to get in position to fly a later flight – it avoids the need to bump a passenger off the plane. Many U.S. carriers will let pilots from other airlines occupy the third seat, at least on domestic flights.

“For the amount of times this type of incident happens — almost never — it’s probably not a procedure we need to get rid of,” Price said. He added, however, that Sunday’s incident will lead to an analysis of whether procedures were followed and whether additional safeguards are needed.

Price could recall only one other similar incident — in 1994, when a FedEx pilot who was facing possible termination tried to kill the crew and crash the plane. The crew subdued the hijacker, who was convicted and sentenced to life in prison.

In 2018, a pilot in the jump seat of a Boeing 737 Max operated by Indonesia’s Lion Air emerged as a hero after helping the crew stop the plane’s nose from repeatedly pointing down. Disaster was averted- — or delayed until the next flight of the plane, which crashed, killing all 189 people on board.

There have been crashes that investigators believe were deliberately caused by pilots. Authorities said the co-pilot of a Germanwings jet that crashed in the French Alps in 2015 had practiced putting the plane into a dive.

In 2018, a Horizon Air ground agent stole an empty plane at Sea-Tac International Airport in Seattle and crashed into a small island in Puget Sound after being chased by military jets that scrambled to intercept the plane. The man told an air traffic controller that he “wasn’t really planning on landing” the aircraft, and described himself as “a broken guy.”

Sunday’s incident occurred on a 76-seat Horizon Air Embraer 175 that left Everett, Washington, at 5:23 p.m. local time and landed in Portland an hour later. Alaska Airlines did not immediately say how many passengers were on board.

Alaska said passengers continued on to San Francisco on a later flight.