Abu Dhabi: The UAE is optimistic that a political settlement could be reached in Libya after it hosted rare talks on Tuesday between its strongman ally and the internationally recognised premier.

The UAE is, with Egypt, the main supporter of Field Marshal Khalifa Haftar, whose forces control most of eastern Libya, including its key oil ports, and who refuses to recognise the UN-backed government of Fayaz Al Sarraj.

The two men met in Abu Dhabi on Tuesday for only the second time since Al Sarraj was named prime minister in late 2015 as diplomatic efforts intensify to end years of chaos and conflict in the North African nation.

The meeting “brings optimism towards guaranteeing a political solution,” the UAE foreign ministry said.

It is an “important step to push forward the political process in Libya,” it added, in a statement carried by the official WAM news agency.

Egyptian President Abdul Fattah Al Sissi, whose government has also been a major supporter of Haftar, was due in Abu Dhabi later on Wednesday. It was not immediately clear if the visit and the talks were connected.

There has been a flurry of diplomatic activity in recent days to try to reconcile the rival administrations in eastern and western Libya.

On Sunday, UN envoy Martin Kobler held talks in Sudan, a supporter of Al Sarraj’s administration in Tripoli.

On Monday, he met Mahmoud Jibril, who headed Libya’s interim government during a Nato-backed rebellion that toppled and killed longtime dictator Muammar Gaddafi in 2011.

An array of armed groups have fought over the country’s oil wealth since the uprising and Al Sarraj’s government has struggled to cement its control.

The UN-brokered Libya Political Agreement (LPA) which created it gave no role to Haftar, and talks have focused on how to do so.

In February, Al Sarraj said Haftar had refused to meet him in person in Cairo for Egypt-backed talks to discuss possible amendments to the LPA.

Mattia Toaldo, senior policy fellow at the European Council on Foreign Relations, said Tuesday’s meeting came after a change of tack from Haftar, who seeks nationwide presidential elections next year.

Haftar is “now pursuing a different strategy ... exchanging his support for an amended LPA for a guarantee to have presidential elections early in 2018 in which it would be thinkable for him to run”, Toaldo said.

Al Sarraj in turn is seeking “badly needed legitimisation” from the eastern authorities, even as he struggles for internal support in western Libya where factions are hostile to Haftar.

“I doubt that anything negotiated by [Al] Sarraj would be accepted peacefully by factions in western Libya if it is seen as giving Haftar a too prominent position within the security sector or the political system,” Toaldo warned.