An alleged hijacker who forced an Egyptian plane to divert to Cyprus and took passengers and crew hostage was wearing a fake suicide vest, officials have confirmed.

The plane was carrying 56 passengers, including 26 foreigners, on an EgyptAir domestic flight from Alexandria to Cairo when a man on board claimed to have an explosive belt.

Most of those on board were freed shortly after the plane landed at Larnaca airport on the Mediterranean island at 8.50am, before the hijacker held seven people hostage for a number of hours.

The man was arrested minutes after some of those being held were seen walking down the stairs of the plane, with another escaping through a cockpit window before they were led away by security officers.

Officials revealed the explosive vest the man was apparently wearing was not real, the airline said.

EgyptAir said Cypriot authorities at the airport had confirmed "the explosive belt that the hijacker allegedly said that he was wearing is fake".

Footage posted on the official Facebook page of Egypt's Ministry of Interior appears to show the hijacker passing through security before boarding the flight.

The man, circled in red, can be seen loading his bag to be scanned and calmly walking through a detector. He is then frisked by a security official before collecting his bag and walking off.

Another image posted on the page shows a scan taken of his bag, which appears largely empty.

Cypriot officials confirmed the incident had reached a peaceful conclusion, with government spokesman Nikos Christodoulides saying: "The hijacker has just been arrested. All passengers and crew are safe."

A number of Britons and an Irish national are thought to have been aboard the flight, MS181, and the Foreign Office said it was helping Britons caught up in the incident and remained in close contact with both Cypriot and Egyptian authorities.

A motive for the hijacking remains unclear but Cyprus president Nicos Anastasiades said it was "not something which has to do with terrorism".

According to The Guardian, an official at Egypt's ministry of foreign affairs added: "He's not a terrorist, he's an idiot. Terrorists are crazy but they aren't stupid. This guy is."

Some reports suggested the incident was related to the alleged hijacker's ex-wife, while others reported he was asking for the release of political prisoners in Egypt.

He also appeared to issue conflicting demands, with Egypt's prime minister Sherif Ismail saying the man had asked to meet European Union officials but also to fly on to another airport.

The alleged hijacker has been named by Cypriot government officials as Seif Eldin Mustafa, whose nationality has not been confirmed.

Amid confusing scenes, the hostage-taker was initially named by Egyptian authorities as university professor Dr Ibrahim Samaha, but a man by that name denied having anything to do with the hijacking, saying he was a passenger who was among those released.

Dr Samaha described the situation on board during the flight, telling the BBC's Victoria Derbyshire programme: "We did not know what was going on. We got on board the plane and we were surprised that the crew took all our passports, which is unusual for a domestic flight.

"After a while we realised the altitude was getting higher, then we knew we were heading to Cyprus. At first the crew told us there was a problem with the plane and only later did we know it was hijacked."

The hijacking will raise serious concerns over security at Egyptian airports, and one aviation expert claimed the incident was a return to "the security stone age".

David Learmount said it appeared the captain of the flight "didn't have faith in the security systems" and felt he had to follow the hijacker's demands, resulting in the "first major successful hijack since 9/11".

But he said the captain should have been confident that it was "impossible" for someone to have got through security with a suicide belt.

He said: "It is taking us back to the security stone age - pre 9/11 when we had lots and lots of regular hijacks because the drill at that time was 'do what the hijacker asks of you and we will deal with it on the ground with negotiators on the ground'."

The incident comes just five months after 224 people were killed when a Russian aircraft crashed over Egypt's Sinai Peninsula minutes after it took off from the Red Sea resort of Sharm el-Sheikh.

Russia later said an explosive device brought down the aircraft in October, and the extremist Islamic State group (IS) said it was responsible.

The Cypriot Ministry of Foreign Affairs said Foreign Secretary Philip Hammond and his Egyptian counterpart Sameh Shoukry had contacted Cyprus' minister of foreign affairs Ioannis Kasoulides to express their "gratitude" for the handling of the hijacking incident.

Mr Hammond tweeted: "Just spoken with Ioannis Kasoulides. Thanked him for Cypriot work in ending EgyptAir situation safely."

He added that the British High Commission in Nicosia, the largest city in Cyprus, is "supporting British nationals".

Later, diplomats in Dublin said they did not believe any Irish citizens had been caught up in the hijacking.

A spokeswoman for Ireland's Department of Foreign Affairs said: "As far as we are aware, none of the passengers was travelling on an Irish passport and we have received no request for consular assistance."