Supporters of Muammar Gaddafi who hijacked an airliner with what were probably replica weapons have surrendered and freed all hostages unharmed in Malta.
Television pictures showed two men being led from the aircraft in handcuffs. Malta Prime Minister Joseph Muscat tweeted: "Hijackers surrendered, searched and taken in custody".
The Airbus A320 had been on an internal flight in Libya on Friday morning when it was diverted to Malta, 500 km (300 miles) north of the Libyan coast, after a man told the crew he had a hand grenade.
Mr Muscat said the grenade and two pistols the hijackers were also carrying appeared to be replicas, according to an initial forensic examination.
A Libyan television channel reported it had spoken by phone with a hijacker who described himself as head of a pro-Gaddafi party. Gaddafi was killed in an uprising in 2011, and Libya has been racked by factional violence since.
With troops positioned a few hundred metres away, buses were driven onto the tarmac at Malta International Airport to collect the 109 passengers plus crew.
After the passengers had left the plane, a man briefly appeared at the top of the steps with a plain green flag resembling that of Gaddafi's now-defunct state.
Libya's Channel TV station said one hijacker, who gave his name as Moussa Shaha, had said by phone he was the head of Al-Fateh Al-Jadid, or The New Al-Fateh.
Al-Fateh was the name Gaddafi gave to September, the month he staged a coup in 1969, and the word came to signify his coming to power.
In a tweet, the TV station later quoted the hijacker as saying: "We took this measure to declare and promote our new party."
Lawmaker Hadi al-Saghir said Abdusalem Mrabit, a fellow member of Libya's House of Representatives on the plane, had told him the two hijackers were in their mid-20s and were from the Tebu ethnic group in southern Libya.
After the standoff ended peacefully, Muscat told a news conference there had been talks between Maltese authorities and the Libyan hijackers.
The men had asked for two Maltese negotiators to board the aircraft, but this was rejected.
"We were not willing to negotiate until there was a surrender," he said, adding that the hijackers had not requested asylum.
A senior Libyan security official told Reuters the first news of the hijack came in a call from the pilot to the control tower at Tripoli's Mitiga airport.
"Then they lost communication with him," the official said, speaking on condition of anonymity.
"The pilot tried very hard to have them land at the correct destination but they refused."
The aircraft, operated by state-owned Afriqiyah Airways, had been flying from Sebha in southwest Libya to Tripoli, a trip that would usually take about two hours.