Hijackers diverted a plane belonging to Libyas national carrier to the Mediterranean island of Malta Friday, the Libyan government confirmed.

The Afriqiyah Airways plane, which was heading from Sabha in southern Libya to the capital Tripoli, was re-directed and received permission to land at Valletta, a source from Libya's unity government told AFP, asking not to be named.

"Negotiations are underway 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, forcing them to head for Malta instead of landing at Tripoli's Mitiga airport.

The hijackers have not yet been identified, the source added.

Libya has been rocked by chaos since the fall of dictator Moamer Kadhafi in 2011.

Only local airlines -- banned from European airspace -- operate in Libya, with flights to Tunis, Cairo, Amman, Istanbul and Khartoum.