Turkey's effort to play a role in resolving Libya's deepening conflict risks further damaging its strained relations with Western allies, by fuelling suspicions that it is doubling down on a pro-Islamist regional agenda.
Libya has descended into chaos three years after the toppling of strongman Muammar Gaddafi, with warring factions battling for control and the capital Tripoli currently run by an alternative government partly backed by Islamist groups.
Turkey's appointment last month of a special representative to Libya, who became the first envoy publicly to meet with the internationally unrecognised authorities in Tripoli, is part of Ankara's efforts to promote U.N.-backed peace negotiations, according to senior Turkish officials.
But the move has bolstered the perception of President Tayyip Erdogan as determined to press on with a policy of backing Islamist movements since the 2011 "Arab Spring" revolts, hurting Ankara's reputation in the West as a regional broker.
Erdogan's criticism of the internationally-recognised Libyan government's move to the eastern city of Tobruk has done little to help, according to H.A. Hellyer, non-resident fellow for the Centre for Middle East Policy at the Washington-based Brookings Institution.
"There's an opportunity for Turkey to be perceived as having a much more ethical foreign policy than other nations. The problem is that instead it's coming across as being as partisan as everyone else, just in different directions," he said.
Libya's disintegration comes as international efforts to tackle Islamic State insurgents in Iraq and Syria have highlighted stark strategic differences between Turkey and its regional and international partners.
Ankara has been reluctant to play a frontline role in the U.S.-led military coalition. U.S. officials have said Turkey's open border policy with Syria helped allow radical groups to grow there.
Diplomatic ties with Egypt have meanwhile crumbled over Erdogan's outspoken support for its ousted president Mohamed Mursi, backed by the Muslim Brotherhood, reinforcing the image of Turkey's leadership as wedded to a pan-Islamist ideology.
POSITION OF STRENGTH
Turkey's Libya envoy Emrullah Isler, an Islamic theologian fluent in Arabic, has been one of Erdogan's key aides and his appointment suggests Turkey's policy in Libya, where it wields considerable cultural and economic clout, is unlikely to change.
Isler's meeting with Omar al-Hasi, self-declared Prime Minister in Tripoli, went directly against the wishes of the wider international community, who do not recognise Hasi, according to one Ankara-based diplomat.
Isler returned to Libya shortly afterwards to meet the government in Tobruk, but the visit did little to dispel doubts about Turkey's motives, the diplomat said.
"Which negotiating table do they want and with what ground rules? Or do they just want their guys in a position of strength?" he said.
The Libyan government in Tobruk this month welcomed Turkey's engagement in U.N.-led efforts to bring stability, but warned against "any paths, dialogues or contacts outside this framework… which do not serve dialogue and reconciliation".
Isler was not available to comment but a senior Turkish official acknowledged "rumours" of Turkish backing for Islamists were circulating in Libya. He said that was something Ankara is keen to counter, and defended the need to talk to all sides.
"NOT TERRORISTS"
The United Nations and Western powers have tried to bring both Libyan sides to the negotiating table to end the chaos, but have avoided recognising or dealing publicly with Hasi, who was elected by a rival assembly in Tripoli.
"These guys are not terrorists, they are a political reality. By denying them it's not possible to convince them (to negotiate)," the Turkish official said.
Ankara does not want to be a mediator and backs U.N. efforts at peace, he said, although he added that the process needed to be enlarged to include other politicians and tribal leaders.
Confusion deepened last week when Libya's top court dissolved the elected assembly in Tobruk as unconstitutional, a move the assembly itself rejected.
Turkey's strong economic links with Libya give Ankara a clear incentive to push for peace. Turks still run restaurants and shops, while $19 billion of construction projects alone have been mothballed by Turkish firms because of the fighting, according to the Turkey Contractors' Association.
The resumption by Turkish Airlines of flights to Misrata last month is a lifeline to western Libya and Tripoli's new rulers, many of whom hail from that port city east of the capital. Tripoli's main international airport has been closed since July after being damaged in fighting.
Maintaining impartial links with Libya could pay economic dividends in the long run, according to Uluc Ozulker, a former Turkish ambassador to Libya.
But Turkey's troubled regional relations and the sense it is taking sides risk eroding its prestige as a broker.
"Turkey as such is on the wrong the path. I believe (we) should keep away for a while from the internal problems of the region," Ozulker said.