CAIRO — Getting out of Egypt was never going to be easy for Seif Eldin Mustafa, a fugitive Egyptian convict who has been on the run since he escaped from prison five years ago. But on Tuesday, he resorted to extraordinary measures.

Claiming to be wearing an explosive vest, Mr. Mustafa, 59, commandeered an EgyptAir passenger airliner en route to Cairo from Alexandria, forced it to divert to Cyprus and set in motion a tense standoff lasting hours. He issued an incoherent set of demands that left officials alarmed, puzzled and touched before he gave himself up without hurting anyone.

Mr. Mustafa wanted female inmates released from Egyptian prisons. He demanded to speak with officials from the European Union, ostensibly to obtain political asylum.

And he wanted to see his former wife, who lived in Cyprus.

“Always, there is a woman,” the president of Cyprus, Nicos Anastasiades, said in a brief moment of levity in the early stages of the crisis at Larnaca International Airport.