LARNACA - An Egyptian man who hijacked an EgyptAir passenger plane and forced it to divert to Cyprus demanding to see his ex-wife surrendered Tuesday after a six-hour airport standoff ended peacefully.

The hijacker, described by officials as "unstable", had claimed to be wearing a bomb belt but no explosives were discovered after he gave himself up at Larnaca airport and was arrested.

Most of the 55 passengers on the plane - originally travelling from Alexandria to Cairo - were quickly released after it had landed but some escaped only minutes before the hijacker surrendered, including one man who climbed out a cockpit window.

"From the beginning it was determined that this was not a case of terrorism," Foreign Minister Ioannis Kasoulides told reporters, adding that the man was "psychologically unstable".

The Egyptian interior ministry identified the man as Seif al-Din Mohamed Mostafa. A police official said he was 58 and had previously served time in prison.Kasoulides said the man demanded to deliver a letter to his Cypriot ex-wife, with whom officials said he has children. She was brought to the airport and spoke to the man, Kasoulides said, without providing further details.

He also delivered a rambling letter in Arabic to authorities making a number of demands, including to meet with a European Union representative and for the release of women prisoners in Egypt. "There was no logical consistency for the demands to be taken seriously," Kasoulides said. Cyprus President Nicos Anastasiades had earlier told reporters "the hijacking is not terrorism-related".

Asked about reports that the hijacker had demanded to see a Cypriot woman, Anastasiades laughed and said: "Always there is a woman."

After searching the hijacker and sending sniffer dogs into the plane, Cypriot police said no bombs had been found.

Kasoulides said the man had also threatened to blow himself up if the plane was not refuelled and allowed to depart for Istanbul.

"We examined the alleged explosives that were found on him. They were not explosives but phone covers made up to give the impression they were explosives," he said.

The EgyptAir plane landed in 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 officials said there were 21 foreigners among the passengers, and that the hijacker had demanded the plane land in either Turkey or Cyprus.

Officials had said seven people, including three passengers, had remained on board until shortly before the man surrendered. Kasoulides said the last two passengers on the plane had been British. The remaining passengers and crew were later seen exiting the aircraft, with several descending the steps from the plane and one clambering out of a cockpit window and dropping to the ground.

A man then emerged, walked across the tarmac and raised his hands to two waiting counter-terrorism officers. They laid him on the ground and searched him for around two minutes before taking him away. At 2:43 pm, Cypriot government spokesman Nicos Christodoulides said on Twitter that "the hijacker has just been arrested".

Officials in both Cyprus and Egypt then confirmed that all crew and passengers were safe.

Cypriot police said there were no immediate indications that anyone had been working with the hijacker. Authorities closed the airport - the main entry point for tourists to the resort island - and nearby beaches during the incident. Incoming flights were diverted to Paphos on the island's western edge.

The Larnaca airport operator later said it had reopened "after the end of the unfortunate incident" and that flights had resumed.

An airport official in Cairo said a plane had taken off to bring the passengers back to Egypt.

Egypt's interior ministry released photographs it said were of the hijacker being searched by airport security before boarding the plane.

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 past 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.