Malta Prime Minister Joseph Muscat has become the first head of government to visit Libya since the formation of a Libyan unity government following a United Nations-brokered agreement.

Muscat met Libyan designate PM Fayez Serraj on Wednesday inside a naval base just outside Mitiga international airport.

Muscat told Maltese reporters that they discussed the presence of Islamic State militants in and around Sirte, noting that the unity government "is still operating from inside a military base, rather than from ministries."

Muscat said the two countries agreed to set up technical commissions to work on illegal migration and energy issues. The possibility of Air Malta resuming flights to Libya was also discussed.

Malta wants to re-open its embassy in Libya but first wants to ensure the safety of its diplomats.