By Orhan Coskun and Nick Tattersall
ANKARA/ISTANBUL (Reuters) - Turkish President Tayyip Erdogan's drive to tighten his grip on power has triggered an open rift with Prime Minister Ahmet Davutoglu, raising questions about the premier's future and troubling allies dependent on the NATO member's stability.
The political uncertainty comes as Europe looks increasingly to Turkey for help in curbing a migration crisis and as Washington draws on Ankara's support in fighting Islamic State in Syria and Iraq. At home, Turkey itself faces attacks by Kurdish militants and spillover of Syian violence.
The feud encompassing issues from relations with Europe to the detention of government critics has already hit investor sentiment, with the stock market weakening further on Wednesday after booking its biggest drop in more than five months the previous day.
"Erdogan may be able to continue with Davutoglu but it is clear that there is currently a fracture. If the matter is not resolved quickly, Erdogan could take the path of choosing a new leader," one source close to the presidency told Reuters.
"The AKP's stability means Turkey's stability, and this problem needs to be solved urgently to avoid economic and political problems."
A spokesman for Erdogan, who has dominated Turkish politics since the AK Party he founded was elected in 2002, declined to comment on what he said was speculation about the future leadership of the party.
The relationship between the two has long been uneasy, shaped by personality as well as politics.
Erdogan, a political fighter hardened by a childhood in Istanbul's rough Kasimpasa district, wants a robust presidential system as a guarantee against the fractious coalition politics that hampered Turkey in the 1990s. His opponents see a stronger presidency as a vehicle for his own ambition.
Such a system would see Davutoglu, a more mild-mannered academic and former diplomat lacking Erdogan's natural appeal to crowds, sidelined.
The two have governed in a strained alliance since Erdogan won the presidency in 2014 and Davutoglu replaced him as prime minister. Aides to Davutoglu have so far largely dismissed tensions, arising often from overlapping competences, as matters of style rather than substance.
But in the clearest sign yet of a power struggle, authority to appoint provincial AKP officials was taken from Davutoglu this week. The move reduces Davutoglu's hold over the party grass roots and cements Erdogan's influence.
In an emotional and uncharacteristically short speech to AKP deputies on Tuesday, Davutoglu said he would rather leave any position than damage the AKP. But he cast suggestions on social media that he was in a battle with Erdogan as the work of "charlatans".
"The millions who put their hope in the AK Party should not worry," he said.
Secularist opposition newspaper Cumhuriyet cast the speech as a signal he may resign. Pro-government columnist Abdulkadir Selvi wrote in the mainstream Hurriyet newspaper that Davutoglu had told AKP officials he was considering stepping down.
Erdogan will meet Davutoglu on Wednesday evening, bringing their usual weekly talk forward by a day. Three senior AKP officials told Reuters the meeting would be crucial for the party and for Davutoglu but they did not expect a resignation.
"I would not be surprised if (Erdogan) decided to go on with Davutoglu at least for a little longer and freeze the crisis. But the issue of chairmanship of the party is going to be the main topic," one official told Reuters.
The two leaders have appeared at odds over a landmark deal with the European Union to stem the flow of illegal migrants from Turkish shores to the Greek islands, in return for which Ankara has been promised accelerated EU accession talks, visa liberalization and financial aid.
"You can feel a very strong tension between Davutoglu and Erdogan. It will get worse," said a senior European politician who has worked with both men for many years.
The deal has been Davutoglu's project.
Erdogan, frequently critical of the EU, has at times appeared to belittle his progress, most notably efforts to win visa-free travel to Europe by June, the main prize in the eyes of many Turks.
"During my time as prime minister it was announced (this) would come in October 2016," Erdogan said recently. "I don't understand why bringing it forward four months is presented as a win. I'm saddened by the presentation of small things in a bigger light."
Aides to the two leaders deny they differ on Europe. But European officials, wary of Erdogan's authoritarian style, see Davutoglu as their main partner and his departure could strain relations.
"Davutoglu seems to be really interested in joining the EU. He believes this is in Turkey’s security interests. We don’t believe Erdogan is as passionate about this," a senior EU official told Reuters.
Ruptures are also evident on questions of human rights, a key area of concern for EU leaders. Erdogan has spoken in favor of the jailing, ahead of their trial, of academics and journalists on charges of supporting terrorist groups. Davutoglu is opposed to such pre-trial detention.
Four Turkish academics were arrested in March, accused of spreading terrorist propaganda, after publicly reading a declaration urging an end to military operations in the largely Kurdish southeast. They have since been released pending trial.
Prominent journalists have been held on similar charges, in what rights groups say is a bid to silence dissent.
But such differences are symptoms of what former diplomat and political commentator Sinan Ulgen called a "fundamental dilemma" facing the two.
"Erdogan's end goal is to consolidate enough popular support to switch to a presidential system. Davutoglu's end goal is to consolidate his own power and be a successful prime minister," said Ulgen, head of the EDAM think-tank in Istanbul.
"The experience so far has been that when people who seemingly had weight in the AKP showed even a soft form of dissent, Erdogan was able to sideline them without significant consequences for the popularity of the party.
"There is no reason to think that would be different in relation to Davutoglu."
(Additional reporting by Ercan Gurses in Ankara and Asli Kandemir in Istanbul; Writing by Nick Tattersall; editing by Ralph Boulton)