Maltese Prime Minister Joseph Muscat said in all 109 passengers had been released.
After more than an hour on the tarmac, the door of the Airbus A320 opened and a first group of women and children were seen descending a mobile staircase.
Dozens more passengers were released minutes later.
Maltese Prime Minister Joseph Muscat said in all 109 passengers had been released, which would leave only two passengers, possibly the hijackers themselves.
Seven crew members were also on board the flight.
"Crew members being released," Muscat said on Twitter, adding: "Potentially 2 hijackers and some crew members still on board aircraft".
Maltese government sources had earlier said only a single hijacker was believed to be on the plane.
The aircraft had been on a domestic Libyan route operated by Afriqiyah Airways from Sabha in southern Libya to the capital Tripoli but was re-routed.
"The Afriqiyah flight from Sabha to Tripoli has been diverted and has landed in Malta. Security services coordinating operations," Muscat tweeted earlier.
"It has been established that Afriqiyah flight has 111 passengers on board: 82 males, 28 females, 1 infant," he said.
Muscat later spoke to Libya's prime minister-designate Fayez al-Sarraj, the head of the north African country's fledgling unity government, the Maltese prime minister's office said.
The plane could be seen on the tarmac surrounded by military vehicles and all flights in and out of the airport were initially either delayed or diverted to destinations in Italy, though some later landed.
A source from Libya's unity government spoke of "hijackers" on board the plane.
"Negotiations are under way to guarantee the security of all the passengers," the source said, without specifying who was negotiating.
An Afriqiyah Airways source said two hijackers had threatened the pilots with an explosive device, probably a grenade.
Malta International Airport tweeted that there had been "an unlawful interference" but that operations had now resumed.
Flights from Brussels, London and Paris had been due to land at the airport on Friday and were delayed.
The flight from Paris has since been able to land, according to the airport's online arrivals board.
Outgoing flights were also shown resuming.
Libya has been in a state of chaos since the 2011 overthrow of Moamer Kadhafi left warring militias battling for control of different parts of the country.
Forces loyal to a fledgling national unity government recently took control of the coastal city of Sirte, which had been a bastion for the Islamic State group since June 2015.
Western powers have pinned their hopes of containing jihadism in the energy-rich North African state on the government but it has failed to establish its authority over all of the country.
A rival authority rules the country's far east, backed by the forces under military strongman Marshal Khalifa Haftar who have been battling jihadists in second city Benghazi.
Only local airlines -- banned from European airspace -- operate in Libya, with flights to Tunis, Cairo, Amman, Istanbul and Khartoum.