Hijackers forced an airliner to land in Malta on Friday then freed all their hostages unharmed and surrendered after declaring their loyalty to Libya's late leader Muammar Gaddafi.
Television pictures showed two men being led from the aircraft in handcuffs. The prime minister of the tiny Mediterranean island, Joseph Muscat, tweeted "hijackers surrendered, searched and taken into 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 one man told crew he had a hand grenade.
Initial reports said one of the men had told crew he was "pro-Gaddafi" and that he was willing to free all passengers if his demands were met. It was unclear what the demands were.
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.
Buses were driven onto the tarmac at Malta International Airport to carry away 109 passengers, as well as some of the crew. Television footage showed no signs of struggle or alarm.
After 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 is the name that 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."
Standoff on tarmac
MP Hadi al-Saghir told Reuters that 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.
Troops were positioned a few hundred meters (yards) from the plane as it stood on the tarmac. Several other flights at the airport were cancelled or diverted.
A senior Libyan security official told Reuters that when the plane was still in flight on Friday morning the pilot told the control tower at Tripoli's Mitiga airport it had been hijacked.
"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 had been flying from Sebha in southwest Libya to Tripoli for state-owned Afriqiyah Airways, a trip that would usually take a little over two hours.
The government of Malta said Prime Minister Muscat had discussed the hijack with Libyan Prime Minister Fayez al-Sarraj by phone, and a negotiating team was formed at the airport. Britain offered Malta help with dealing with the incident.
The last major hijacking on the island was in 1985, when Palestinians took over an Egyptair plane. Egyptian commandos stormed the aircraft and dozens of people were killed.