There was little doubt that Seif Eldin Mustafa was “unstable,” as authorities described him. On Tuesday morning, the 59-year-old Egyptian national boarded an EgyptAir flight and hijacked it to Cyprus by claiming to wear a suicide belt.

Nearly six hours later, when the hostage standoff ended peacefully, many things remained unclear — except for two: There were no explosives on Mustafa or on the aircraft. And Egypt’s airport security was again drawing concern, potentially delivering a blow to the country’s already battered economy and its efforts to attract more tourists and foreign investors.

Even though Egyptian officials ruled out terrorism as a motive and all the hostages were freed without any reports of injuries, there was an uneasy sense of deja vu. No one had forgotten how a bomb brought down a Russian passenger plane over Egypt’s Sinai Peninsula in October, an attack claimed by the Islamic State militant group. Since then, Egypt has sought to bolster security at its airports, even hiring international security consultants to build confidence.

So the hijacker’s commandeering of EgyptAir Flight 181 in a fake explosives vest has only set off more alarms. Since the Sept. 11, 2001, terrorist attacks in the United States, plane hijackings have become rarer because of increased airport security, tighter passenger screenings and reinforced cockpit doors to prevent a takeover. Yet Mustafa easily diverted the plane, which took off from the Egyptian port of Alexandria en route to Cairo, from its scheduled path.

The Egyptian airliner — an Airbus 320 — was carrying more than 55 passengers and crew members from several nations, including Americans and Europeans. Within minutes, the hijacker was able to force the plane to head north to Larnaca, a port on the southern coast of Cyprus.

Mustafa’s motive remains unclear. Nor is much known about him. Egyptian media reports described him as a 59-year-old who owned an import-export company, has had run-ins with the law and had once been expelled from the law faculty of Alexandria University. None of the reports could be independently verified.

At one point, Cyprus’s state broadcaster said the hijacker asked for the release of political prisoners in Egypt. A spokesman for the Cypriot government earlier speculated that the hijacker may have been driven by a failed relationship — citing a letter he had asked to deliver to a woman, possibly his former wife, who lives on the eastern Mediterranean island.

The television network Sky News Arabia interviewed a woman described as Mustafa’s sister who said that he was unemployed and that his three children lived with his former wife in Cyprus. The sister said Mustafa had been banned from entering Cyprus for a year and described him as “an incredibly peaceful man.”

After the plane touched down in Larnaca, most of the passengers were allowed to disembark almost immediately. But three foreign passengers, the pilot, the co-pilot, a female flight attendant and an air warden were held hostage for the duration of the standoff.

Even as negotiations continued with the hijacker, officials in Cyprus and Egypt were rejecting any connection to terrorism, apparently out of concern for their tourist-driven economies. Cypriot President Nicos Anastasiades said at a news conference that the hijacking was “not something which has to do with terrorism,” even speculating that Mustafa may have been motivated by a relationship with a woman.

A man commandeered an EgyptAir flight from Alexandria with more than 55 passengers and crew aboard. The hijacker, identified as Seif Eldin Mustafa, surrendered to authorities. (Jason Aldag/The Washington Post)

At a news conference in Cairo during the standoff, Sherif Fathy, Egypt’s minister of civil aviation, chastised a reporter for asking about concerns involving security at Egyptian airports. Other officials, including the tourism minister, touted Egypt’s airport security, saying all protective measures were taken on Tuesday. Egyptians took to social media to deride such claims.

“An officer on ONTV praising Egypt airport security in context of highjacking tells u why world won’t trust us,” tweeted Timothy Kaldas, an academic, referring to a pan-Arab news channel. “We can’t admit we have problem.”

The hijacking could not have come at a worse time for Egypt. Militant attacks have surged in recent years, driving tourists and foreign investors away as the government struggles to revive the economy. Egypt’s U.S.-backed military is battling an Islamic State affiliate in the northern Sinai .

Terrorists increasingly see airports as vulnerable targets. In February, a bomb smuggled on a Somali airliner leaving Mogadishu detonated in flight, blowing a hole in the fuselage and killing one passenger. The crew managed to safely land the plane. At another Somali airport, militants detonated a bomb in a laptop. And a week ago, suicide attacks claimed by the Islamic State killed more than 30 people at Brussels’s main airport and a subway station.

Despite the increased security, planes remain vulnerable. In February 2014, a man falsely claiming to have a bomb demanded that a Pegasus Airlines plane — traveling from Kharkiv, Ukraine, to Istanbul — be diverted to Sochi, Russia, which was then hosting the Winter Olympics. The pilot landed in Istanbul, telling the hijacker they were in Sochi. The man, who was apparently intoxicated, was arrested. No passengers or crew members were harmed.

Less than two weeks later, the co-pilot of an Ethiopian Airlines flight from Addis Ababa to Rome took command of the aircraft and landed in Geneva, demanding asylum. He was arrested, and no injuries occurred. In March 2015, Andreas Lubitz, the co-pilot of Germanwings Flight 9525, took control of the plane before crashing it in the French Alps, killing all 150 people aboard.

Inside Flight 181, there were signs that Mustafa was an amateur. He allowed a British passenger to snap a selfie photo with him, which later went viral. In Cairo, Fathy told reporters that some phone calls made by the hijacker while aboard the plane pointed to possible personal and mental problems. He also noted that Mustafa possibly did not possess any explosives. “We’re not sure of the suicide belt,” Fathy said at the time. “It could be a fake one.”

Confusion reigned throughout the standoff. Initially, both Egyptian and Cypriot authorities identified someone else as the hijacker; he turned out to be a passenger. EgyptAir initially said there were 88 passengers aboard. At one point, Cypriot media reported that the hijacker wanted to see his ex-wife and that the woman was said to be on her way to the airport.

About 2 p.m. Egypt time, several events unfolded rapidly, including an escape by an apparent hostage, who slithered down a rope from a cockpit window. The other hostages later walked out of the aircraft, and Mustafa was taken into custody.

“It’s over. The #hijacker arrested. #LarnacaAirport # Egyptair,” Cyprus’s Foreign Ministry tweeted.

Heba Habib in Cairo, Brian Murphy in Washington and Daniela Deane in London contributed to this report.

Read more:

Five years after Egypt’s Arab Spring: ‘We didn’t need a revolution’

Egyptian aviation under scrutiny after Sinai crash

Today’s coverage from Post correspondents around the world