All passengers were freed from a hijacked plane in Malta on Friday, but some crew remained on board with hijackers believed to be loyalists of late Libyan leader Muammar Gaddafi.

The aircraft was 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 crew he had a hand grenade.

Initial reports said a hijacker had told crew he was “pro-Gaddafi” and that he was willing to let all passengers leave the Airbus A320 if his demands were met.

It was unclear what the hijackers’ demands were. A Libyan television channel reported that it had spoken by phone with one of them, 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.

Hijacked airliner lands in Malta - two threaten to blow up the plane - https://t.co/f56cZHT9UZ pic.twitter.com/RDaMcEyCdW — Television Malta (@TelevisionMalta) December 23, 2016

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.

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 canceled 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.”

Hijacked Afriqiyah Airways flight diverted to Malta https://t.co/bEAPwrpZts pic.twitter.com/Haor9Zr09n — Flightradar24 (@flightradar24) December 23, 2016

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 Maltese Prime Minister Joseph Muscat had discussed the hijack with Libyan Prime Minister Fayez al-Sarraj by phone, and a negotiating team had been formed and was at the airport. Britain offered Malta help with dealing with the incident.

The last major hijacking on the tiny Mediterranean island was in 1985, when Palestinians took over an Egyptair plane. Egyptian commandos stormed the aircraft and dozens of people were killed.