The suspected hijacker of an EgyptAir airliner surrendered to authorities on Tuesday, Cyprus's state broadcaster said.
The hijacker emerged from the aircraft with his hands in the air, state TV said.
The hijacker seized the plane as it left Alexandria and forced it to land in Cyprus on Tuesday. A government source told AFP the hijacker had demanded to see a Cypriot woman, his estranged lover who lives on the island.
The EgyptAir plane landed at the airport in the southern coastal city of Larnaca at 8:50 am (0550 GMT), after the hijacker had contacted the control tower 20 minutes earlier to demand the diversion.
Egyptian civil aviation said he had threatened to detonate an explosives belt on the Airbus A-320, which had been headed from the Mediterranean coastal city of Alexandria to Cairo.
Most of the passengers were allowed to disembark after the plane landed, with the few remaining hostages released shortly before the hijacker surrended.
The plane had been carrying 21 foreigners including two South Africans, eight Americans, four Dutch citizens, four Britons and a French citizen, an Egyptian civil aviation ministry statement said.
Fathy said there had been 55 passengers on board the plane and that the hijacker had demanded it land in either Turkey or Cyprus.
"He had no gun or anything. We don't know yet whether his (explosives) belt is real but for the safety of passengers we are dealing with it as real," Fathy said.
Cyprus President Nicos Anastasiades told reporters the incident appeared to be motivated by personal reasons.
"The hijacking is not terrorism-related," he told a joint news conference with the visiting president of the European Parliament, Martin Schultz.
Asked about reports that the hijacker had demanded to see a Cypriot woman, Anastasiades laughed and said: "Always there is a woman."
Police spokeswoman Nicoletta Tirimou said the hijacker had given authorities a letter written in Arabic that was being translated. Local media reported that the letter had been dropped onto the tarmac.
Tirimou said the man's ex-lover had arrived at the airport and that the couple had children.
She said the freed passengers remained at the airport and Fathy said a plane would be sent to collect them.
The airport, the main entry point for tourists to the resort island, was closed and incoming flights diverted to Paphos on the country's western edge.
Concerns were raised about security at Egyptian airports after a Russian airliner was downed on October 31 over Egypt's Sinai Peninsula, killing all 224 people on board. The Islamic State group claimed to have smuggled a bomb on board the plane.
Larnaca is no stranger to hostage crises. Several hijacked planes were diverted to the airport in the last few decades.
In August 1996, a Sudan Airways Airbus A-310 was hijacked by seven Iraqis between Khartoum and Amman with 199 people on board. After a stopover in Larnaca it flew on to London's Stansted airport, where the hijackers gave themselves up.
In 1988, a Kuwait Airways flight hijacked en route from Bangkok to Kuwait was diverted to Iran's second city Mashhad and later to Larnaca, where hijackers killed two Kuwaiti passengers and dumped their bodies on the tarmac.
In February 1978, an Egyptian commando unit stormed a hijacked Cyprus Airways DC-8 at Larnaca airport, where 15 passengers were being held hostage. Some 15 Egyptian soldiers were killed and 15 wounded in a firefight with Cypriot forces. All the hostages were freed and the hijackers arrested.