Security guards thwarted an attempted hijacking Wednesday on an EgyptAir flight from Istanbul to Cairo by overpowering a man who threatened crew with a knife, a security official for the airline said.

A Sudanese man used a knife from the in-flight meal to threaten crew members and demanded that the flight be diverted to Jerusalem, the official said. Guards on the flight were able to detain the man and no one was hurt, he said.

The flight landed safely at Cairo airport, said the official, who spoke on condition of anonymity because he is not an official spokesman.

Turkish aviation authorities did not immediately have any information on the incident.