Khalifa Haftar, leader of the eastern half of divided Libya, met President Recep Tayyip Erdogan in Ankara on Wednesday on his first formal visit to Turkey, the presidency said.
The meeting marks a thaw between the longtime rivals.
Turkey backed the Tripoli-based, UN-recognised government against Haftar's eastern forces during Libya's civil war, but Ankara has in recent years sought to deepen ties with power brokers across the divided country.
A photograph released by Erdogan's office showed the Turkish president meeting Haftar and his delegation, which included his son and presumed heir, Saddam Haftar.
Erdogan's office did not provide details of the closed-door talks.
Earlier, Haftar met Turkey's foreign and energy ministers, intelligence chief and military leaders, according to images shared by the foreign ministry.
Libya has been wracked by unrest since the 2011 uprising that toppled and killed longtime ruler Muammar Gaddafi.
Turkey intervened in support of the Tripoli government when it came under siege from Haftar's forces, supplying armed drones that helped repel an offensive on the capital in 2019.
In 2020, Erdogan described Haftar as "a mercenary" and accused regional powers including the United Arab Emirates and Egypt of funding him.
But Ankara has since repaired ties with several regional actors and expanded contacts with eastern Libyan authorities as part of efforts to bridge the country's political divide.
