Eastern Libyan military commander Khalifa Haftar has arrived in Ankara on what is believed to be his first visit to Turkiye, a trip analysts say may help the Turkish government bring Libya's divided rivals closer together, according to Al Jazeera.

The visit on Tuesday came two days after a long-range Ukrainian attack hit a Russian warship docked in Benghazi, the main city in Haftar-controlled eastern Libya. Local authorities said at least 10 Libyan and Russian crew members were killed.

Welcomed by Turkey's top general

Photos released by the General Command of the Libyan National Army (LNA) showed Haftar being received at the airport by Turkiye's Chief of General Staff, General Selcuk Bayraktaroglu.

No official readout of the talks was published, but Reuters reported that Haftar was expected to meet President Recep Tayyip Erdogan.

Haftar travelled with two of his sons. Khaled Haftar is the LNA's chief of staff, while Belqasim Haftar leads Libya's Development and Reconstruction Fund. A third son, Saddam Haftar, the LNA's deputy commander and widely regarded as his father's successor, was in Doha for separate talks with Qatar's minister of state for defence.

Strike on Russian vessel

The Russian warship had stopped in Benghazi to refuel and take on supplies under an arrangement with the eastern authorities. On Monday, Libya's internationally recognised government in Tripoli condemned the attack, saying neither Russia nor Ukraine had the right to carry out military operations on Libyan soil or in its waters.

Shifting Turkish role

Ankara's involvement in Libya is not new. Turkiye backed the then-Tripoli government in pushing back Haftar's offensive on the capital in 2019 and 2020. Since a UN-brokered ceasefire ended major fighting in 2020, it has cultivated ties with Haftar's camp while keeping its alliance with Tripoli.

On Saturday, Turkish Foreign Minister Hakan Fidan and intelligence chief Ibrahim Kalin met Abdul Hamid Dbeibah, prime minister of the Tripoli-based Government of National Unity, in Istanbul. Fidan later told a Turkish television channel that Erdogan would visit Libya in December, his first trip there in 15 years.

Haftar's visit also follows a decision weeks ago by the eastern-based House of Representatives to approve a 2019 maritime boundary agreement with Turkiye, reversing years of opposition. The European Union, Greece, Israel and Egypt condemned the vote.

The presidency question

Saddam Haftar is reportedly seeking a leading national role with Washington's backing. Massad Boulos, US President Donald Trump's senior adviser for Arab and African affairs, has been promoting a power-sharing plan between Tripoli and Benghazi that would make Saddam chairman of the Tripoli-based Presidency Council.

Libya analyst Jalel Harchaoui told Al Jazeera that powerful factions in Tripoli and the western city of Misrata oppose the idea. He said Ankara takes that resistance seriously because forcing the appointment could destabilise the country.

"The Turks are more pragmatic and realistic than Boulos," Harchaoui said.

According to Harchaoui, the eastern parliament's approval of the maritime deal was an attempt to win Turkish support for Saddam's bid for the council chairmanship.

He added that by hosting the elder Haftar, Erdogan has opened another avenue to show progress in reconciling Libya's rivals. The analyst suggested the Turkish leader could seek a meeting between Dbeibah and Khalifa Haftar during his December trip, as Ankara tries to build its own approach, separate from the US-led effort.

This story was prepared by the Hamasta Newsdesk with AI assistance, based on reporting by Al Jazeera. Read the original report. Photo: Al Jazeera.