CAIRO — In an eerie coincidence, the EgyptAir jetliner that plunged into the Mediterranean on Thursday was once the target of political vandals who wrote in Arabic on its underside, “We will bring this plane down.”

Three EgyptAir security officials said the threatening graffiti, which appeared about two years ago, had been the work of aviation workers at Cairo Airport. Playing on the phonetic similarity between the last two letters in the plane’s registration, SU-GCC, and the surname of Egypt’s president, Abdel Fattah el-Sisi, some workers also wrote “traitor” and “murderer.”

The officials, who were interviewed separately and who spoke on the condition of anonymity to describe the airline’s security procedures because they were not authorized to speak publicly, said the graffiti had been linked to the domestic Egyptian political situation at the time rather than to a militant threat. Similar graffiti against Mr. Sisi, a former general, was scrawled across Cairo after the military ousted the elected president, Mohamed Morsi, in 2013.

Since then, the airline has put into effect a variety of new security measures in response to Egypt’s political turmoil, jihadist violence and other aviation disasters like the crash of a Russian plane that killed 224 people in October. EgyptAir has fired employees for their political leanings, stepped up crew searches and added extra unarmed in-flight security guards. Three such guards died in Thursday’s crash of Flight 804.