Turkey's Prime Minister Ahmet Davutoglu on Thursday announced he would step down in two weeks as ruling party chief and premier, in a shock exit set to further boost President Recep Tayyip Erdogan's growing powers.
Divisions between Davutoglu and Erdogan that had been rumoured for months burst into the open on Wednesday, with the two leaders holding crisis talks at the presidential palace that failed to resolve the conflict.
Davutoglu said after a central executive committee meeting of the ruling Justice and Development Party (AKP) that the party would hold an extraordinary congress on May 22 and he would not be standing for a new mandate.
This means that the premier -- who headed the government since 2014 when Erdogan moved from the premiership to the presidency -- will step aside from his twin jobs of AKP boss and prime minister and the congress will choose a new leader.
According to the conventions of the AKP -- a party co-founded by Erdogan to bring Islam into the mainstream of Turkey's secular politics -- the party chairman and head of government are the same person.
"I don't think I will be a candidate in the next congress in the current circumstances," Davutoglu said.
He added that after "consultations with friends", including Erdogan, "I have decided that it will be better to change party leader... for the continuation of the AK Party's unity".
The development, branded a "palace coup" by the opposition, rattled financial markets.
In an emotional farewell statement, Davutoglu gave a long description of his achievements as premier and insisted he held no regrets.
But alluding to a lack of support by some within the AKP, he said he could not be a candidate for the party leadership "if there is no consensus".
The appointment of a potentially more pliant prime minister would allow Erdogan to further consolidate his powers as he seeks to win backing for controversial constitutional changes to make Turkey a presidential system.
Since becoming president after over decade as premier, Erdogan has sought to tighten his grip on the levers of power, leading critics to accuse him of authoritarianism and cracking down on press freedom.
"What happened is a palace coup. Davutoglu should have resisted," said Kemal Kilicdaroglu, head of the main opposition Republican People's Party (CHP).
Soner Cagaptay, director of the Turkish Research Program at the Washington Institute, said the move was the next stage in a "hollowing out" of Turkish institutions by Erdogan.
"It shows how much power has been massed in one person's hands," he told AFP, adding that Erdogan was now exercising more control than anyone in Turkey's modern democratic history.
Leading potential successors to Davutoglu include the president's longtime henchman Transport Minister Binali Yildirim, and the youthful Energy Minister Berat Albayrak, 38, who is married to the president's eldest daughter Esra.
But press reports also pointed to less high-profile figures, such as Deputy Prime Minister Yalcin Akdogan, Justice Minister Bekir Bozdag, or AKP deputy chairman Mehmet Ali Sahin.
The political tumult unnerved financial markets, with the lira losing almost four percent in value against the dollar on Wednesday.
The currency rallied by 1.84 percent Thursday, supported by the prospect of a smooth succession process as Davutoglu stays on to the May 22 congress and his apparent lack of public rancour.
The prime minister's office also said Davutoglu would go ahead with a scheduled visit to Bosnia on Friday and Saturday.
Still, the shake-up comes at a challenging time for Turkey, with Ankara battling Kurdish militants in the southeast and in Iraq, Islamist jihadists on the Syrian border as well as hosting 2.7 million refugees from the Syria war.
Relations between Erdogan and Davutoglu had been seen by analysts as uneasy, but the speed with which their divisions burst into the open took many by surprise.
The premier championed a March deal with the EU to stem the flow of refugees across the Aegean Sea -- an accord in which the president has shown little interest despite Turkey on the verge of winning visa-free travel to Europe for its citizens.
Davutoglu had said there was no need for haste in Erdogan's drive to create a presidential system in Turkey, a pet project of the president that risked diminishing the premier's own powers.
A decision last week by the AKP executive committee to remove Davutoglu's right to appoint regional party officials was seen by commentators as the most severe blow yet to the premier's authority.
But Davutoglu vowed to stay on as an AKP lawmaker and pledged to never voice "a single word" of criticism of Erdogan, saying their strong relationship would continue "until my last breath".
In a speech in Istanbul on Thursday, Erdogan made no mention of the premier's resignation.