Israel has some of the world’s most stringent air travel security measures. The United Arab Emirates proudly adheres to international aviation safety standards. Yet those safeguards failed to prevent a flight between the countries from taking a dangerous plunge during an alleged attack in the cockpit.

The copilot allegedly stabbed the captain in the cockpit before passengers intervened aboard FlyDubai Flight FZ1073 after taking off from Dubai, UAE, with 182 people including eight crew members flying to Tel Aviv, Israel, on Wednesday.

The airplane made a safe emergency landing in Saudi Arabia on Wednesday and the incident is under investigation by Saudi, Emirati and Israeli authorities, with the United States and Oman assisting efforts to determine a motive.

“Until this event, the possibility of a threat originating from a pilot or crew member was not considered a likely scenario. Security efforts have traditionally focused much more heavily on passengers and their luggage,” said Eyal Hulata, Israel’s former national security adviser. “That will probably change now and crew members will be subject to heavier screening.”

Israel’s security protocols focus heavily on Israeli airlines and departing flights from Ben-Gurion International Airport. A potential Achilles’ heel lies overseas, where procedures for Israel-bound flights vary and are harder for Israeli authorities to oversee.

Dubai International Airport, the world’s busiest airport for international passenger traffic, has built some of its appeal around a reputation for safety in a volatile region, said Philip Baum, a visiting professor of aviation security at Coventry University in England.

“They are very conscious of the fact, a little bit like Israel in many respects, that they cannot afford to have a terrorist attack happening on a flight out of there,” he said.

Pilot vetting and preflight screening aren’t uniform worldwide

Investigators have not publicly identified the object used to stab the flight’s captain or said whether it was carried onto the plane or came from inside the aircraft.

Preflight screening of flight crews should generally “mirror very closely what a passenger goes through,” although security procedures vary around the world, said Dave Komendat, a senior security adviser at risk management firm International SOS and former chief security officer for Boeing.

Prime Minister Benjamin Netanyahu said Thursday that Israel has long-standing agreements with foreign carriers to keep pilots from flying into the country if they are citizens of nations that don’t maintain diplomatic relations with Israel.

Israeli authorities have described the FlyDubai copilot as Omani. Israel and Oman do not have formal diplomatic relations, raising questions about how the suspect ended up on the Tel Aviv-bound flight.

“Obviously, there was a loophole here. And we’re taking care of that,” Netanyahu said Thursday during an interview with Fox News Channel’s “Fox and Friends.”

Israel will increase security precautions on flights coming into the country whether or not they are operated by Israel. Pilots flying into Israel will be vetted and Israel will know their identities, prime minister’s office spokesperson Doron Spielman told The Associated Press.

There were no Israeli air marshals on the FlyDubai flight and the people who helped were civilians, Spielman added.

The International Civil Aviation Organization sets baseline pilot-vetting and licensing standards, while national regulators and airlines can impose additional requirements.

Aviation security expert Menachem Bachrach said Israel relies largely on foreign governments and airlines to vet their own crew members, and Wednesday’s incident may point to a compliance lapse rather than a flaw in the procedures.

“Before we’re jumping to tighten security, I would just say it’s likely that somebody didn’t follow the protocols,” Bachrach said.

Investigators to look for red flags and review distress call handling

Israeli flag carrier El Al periodically assesses its pilots’ fitness to fly, while other airlines may do so less often, said Arik Arad, chairman of the aviation cybersecurity consultancy CYVIATION and El Al’s former head of security at Ben Gurion Airport.

Investigators will want to know whether colleagues previously reported concerns about the copilot and, if so, how the airline responded, Komendat said.

Investigators in the UAE and Israel also are likely to review responses to the distress signals that came from the FlyDubai plane after a steep drop in altitude.

A person who heard the FlyDubai flight’s air traffic control communications said a crew member reported a hijacking and requested ambulances. Authorities in Saudi Arabia and Jordan initially refused to clear the aircraft for landing, said the person, who spoke on condition of anonymity because they were not authorized to speak to the media.

The crew member eventually persuaded Saudi authorities to allow the plane to set down at Prince Sultan bin Abdulaziz International Airport in the city of Tabuk.

International aviation standards call for countries to give aircraft facing hijacking or other “unlawful interference” maximum assistance and priority. But the underlying 1944 treaty, the Convention on International Civil Aviation, only requires a country to provide assistance “as it may find practicable,” making it a “relatively soft obligation,” said Vincent Correia, co-director of McGill University’s Institute of Air and Space Law.

Standard practice in a serious emergency is to get an aircraft on the ground as quickly as possible at the nearest suitable runway, “regardless of nationality, flight plan or politics,” said John Gradek, who manages McGill’s Aviation Management Program.

Gradek stressed it’s still not clear why the FlyDubai plane took a 180-degree turn as it crossed into Jordanian airspace before heading southwest to Tabuk. It’s not unusual for flight crews to bypass the nearest airport in favor of one better-equipped to meet a plane’s needs, he said.

Locked cockpits have been central to flight security for 25 years

Netanyahu said the flight’s injured captain saved the aircraft and everyone on it by resisting the copilot’s attacks long enough to open the 737’s cockpit door, enabling passengers to subdue the suspect and other FlyDubai crew members to take the controls and land the plane.

Cockpit doors worldwide were reinforced and locked after the Sept. 11, 2001, attacks to keep intruders out. The FlyDubai incident, and past crashes caused by pilots who wanted to take their own lives, highlight the risk when a threat comes from inside the cockpit.

“The industry itself needs to recognize that flight deck door — whilst installed for very understandable reasons to prevent a suicidal hijacking by a passenger — has also created a fortress into which the good guys cannot gain access to a rogue individual, be it a hijacker or a rogue crew member,” Baum said.

Airline personnel know more about aviation security weaknesses and can gain the trust of security workers they regularly encounter, Osprey Flight Solutions Chief Intelligence Officer Matthew Borie, whose company advises airlines on flight threats, said.

“Unfortunately, if an insider with nefarious intent wants to carry out something like this, they may actually be best placed to know where the most vulnerable points are and how to breach them,” Borie said.

___

Yamat reported from Las Vegas, Nevada, and Marcel from New York. Jill Lawless in London, Sam Mednick in Tel Aviv, Israel, and Josh Funk in Omaha, Nebraska, contributed to this report.

This story was originally featured on Fortune.com