Flydubai said in a statement that “an altercation occurred in the flight deck” and the flight was “successfully secured by on-duty Flydubai crew travelling on the flight, who diverted and landed the aircraft safely at Tabuk airport”.

An airline spokesperson added: “Our immediate priority is to ensure the ongoing safety, health, and wellbeing of all passengers and crew members involved in this incident and support the official investigation.”

The passengers who had been on board flight FZ1073 arrived in Tel Aviv at around 18:40 local time (15:40 GMT). They were greeted at the airport by crowds of onlookers playing music, singing, dancing and waving Israeli flags.

A number of people were “very emotional and crying as they came off the plane,” a paramedic from Israel’s ambulance service told the BBC.

One passenger, Yaniv Hayun, met Netanyahu and told him how he and others on the flight had restrained the attacker.

“The pilot who was stabbed was simply very close to the door, so it was hard for us to open it,” Hayun said in a video posted on social media by the prime minister’s office, but before the stabbed pilot – now identified as Machchhar – collapsed, he was able to open the door.

Yaniv said he put the attacker, who was trying to disable the plane, in a chokehold before other passengers helped pin him down.

He added that he “pulled the controls” of the plane and after it levelled out, another pilot took over control.