(AP) -- An Egyptian man who hijacked an EgyptAir plane during a domestic flight to Cairo and forced it to land on the island of Cyprus on Tuesday has surrendered and was taken into custody after he released all the passengers and crew unharmed.
His surrender ended an hours-long standoff at Larnaca airport on the island nation's southern coast. The hijacker had earlier freed most of the passengers but kept on board seven people -- four crew members and three passengers.
The man's motivations were unclear, but officials said the hijacking was not terrorism-related, and that the hijacker had tried to communicate with his Cypriot ex-wife, who lives on the island.
Just minutes before the arrest, local TV footage from the airport showed several people disembarking from the aircraft and a man who appeared to be a crew member climbing out of the cockpit window and sliding down the side of the plane.
Alexandros Zenon, the permanent Secretary of the Foreign Ministry in Cyprus, confirmed the hijacker's surrender and subsequent arrest, saying the situation was "over." Egypt's Civil Aviation Minister Sharif Fathi told state television that "all passengers and crew are safe."
Cyprus President Nicos Anastasiades said the hijacking was "not something that has to do with terrorism," and a Cyprus government official, speaking on condition of anonymity to discuss an ongoing investigation, said the man "seems (to be) in love."
Anastasiades, appearing alongside European Parliament President Martin Schulz in Nicosia, was asked by reporters whether he could confirm that the incident was about a woman. "Always, there is a woman," he replied, drawing laughter.
The hijacker had asked to speak to is his Cypriot ex-wife, with whom he has four children, a Cypriot police official said. The hijacker also complained about the Egyptian government and demanded the release of female prisoners from Egyptian jails.
A Cypriot civil aviation official said the man gave negotiators the name of a woman who lives in Cyprus and asked to give her an envelope. It was not clear if she was his former wife.
The police official said the hijacker walked off the plane and was taken into custody by special anti-terrorism police. He said the man wore a belt but there were no explosives in it.
Flight MS181 took off Tuesday morning from Bourg el-Arab airport just outside the Mediterranean coastal city of Alexandria en route to Cairo with at least 55 passengers, including 26 foreigners, and a seven-member crew.
An official with flight-tracking website FlightRadar24 said the plane showed no immediate signs of distress. The flight between Alexandria and Cairo normally takes about 30 minutes.
Egyptian officials gave conflicting accounts as the drama unfolded. The Aviation Ministry said in a statement that the hijacker was wearing an explosives belt, which turned out to be untrue.
Egyptian government spokesman Hossam al-Queish identified the hijacker as Ibrahim Samaha, but an Egyptian woman who identified herself as Samaha's wife said her husband is not the hijacker and was on his way to Cairo so he could fly to the U.S. to attend a conference.
The woman, who identified herself only as Nahla, told the Egyptian private TV network ONTV by phone that her husband had never been to Cyprus and that a photo on Egyptian and regional TV channels that purportedly showed the hijacker was not him.
Later, the official Middle East News Agency identified the hijacker as Seifedeen Mustafa, without providing further details. A senior Cypriot official confirmed the name of the hijacker, but also provided no further details.
All officials spoke on condition of anonymity because they were not authorized to brief reporters.
Police in Cairo were questioning the hijacker's relatives, Sharif Faisal, the police chief for the industrial suburb of Helwan, told The Associated Press.
The Egyptian Civil Aviation Ministry said the foreigners on board included eight Americans, four Britons, four Dutch, two Belgians, a French national, an Italian, two Greeks and one Syrian. Three other foreigners could not be identified.
The initial group of passengers released by the hijacker was seen calmly walking off the plane down a set of stairs, carrying their hand luggage and boarding a bus. Security was tight at the airport, with police repeatedly pushing back reporters and TV crews working just outside the fence, near where the aircraft stopped. Police also evacuated a nearby beach popular with tourists.
Egyptian passenger Farah el-Dabani told the Dubai-based Al-Arabiyah TV network that the hijacker was seated in the back of the aircraft and that it was the crew who told passengers that the plane was being hijacked.
"There was panic at the beginning, but the crew told us to be quiet. They did a good job to keep us all quiet so the hijacker does not do anything rash," she said in a telephone interview.
The incident raises more questions about security at Egyptian airports, five months after a Russian aircraft crashed over the Sinai Peninsula minutes after it took off from Egypt's Red Sea resort of Sharm el-Sheikh.
All 224 people on board were killed in the crash. Russia later said an explosive device brought down the aircraft, and the extremist Islamic State group took responsibility. Russia suspended all air links to Egypt after the revelations about the bombing, dealing a major blow to Egypt's vital tourism industry. Tuesday's hijacking could further postpone the resumption of such flights.
___
Hendawi reported from Cairo. Maggie Michael and Sam Magdy in Cairo contributed to this report.