ANKARA/ISTANBUL (Reuters) - Ahmet Davutoglu announced on Thursday that he was stepping down as leader of Turkey's ruling AK Party and therefore as prime minister, bowing to President Tayyip Erdogan's drive to create a powerful executive presidency.
In a speech defending his record but also vowing loyalty to Erdogan, Davutoglu said he had kept his party and the government intact during a tumultuous period and pledged that "strong" AKP government would continue.
After a leadership meeting of the party founded and dominated by Erdogan, Davutoglu told reporters that, under the current circumstances, he would not run again for leader at an extraordinary party congress on May 22.
"I am telling our members, up until today I was leading you. From now on, I am among you," he said.
Davutoglu's departure plunges the NATO member into political uncertainty just as Europe needs its help in curbing a migration crisis and Washington needs support in fighting Islamic State in Syria and Iraq.
There could now be a third parliamentary election in less than 18 months.
Davutoglu's departure follows weeks of tensions with Erdogan. His successor is likely to be significantly more willing to back Erdogan's aim of changing the constitution to create a presidential system, a move that opponents say will bring growing authoritarianism.
Main opposition leader Kemal Kilicdaroglu condemned what he called a "palace coup" and rejected attempts by AKP officials to dismiss it as an internal affair.
Mehmet Ali Kulat, head of the pollster Mak Danismanlik, which is seen as close to Erdogan, forecast an election in October or November. "From now on, Turkey's sole agenda is the presidential system and an early election," he said.
Erdogan sees rule by the head of state as a guarantee against the fractious coalition politics that hampered the government in the 1990s. His opponents say he is merely furthering his own ambition.
"These are critical developments in my mind in Turkey - likely setting the long-term direction of the country, both in terms of democracy, but (also) economic and social policy and geopolitical orientation," said Timothy Ash, strategist at Nomura and a veteran Turkey watcher.
"Turkey changes as a result to an Asiatic model of development, with strong central control from the presidency, and most key decisions taken by the president and a small group of likely unelected advisers."
With growth slowing and inflation well above target, investors were nervous about the prospect that economic reforms could be delayed further. But the lira TRYTOM=D3 recouped around half the previous day's losses after Davutoglu indicated he would go quietly, while Istanbul's BIST 100 share index .XU100 also rebounded to finish slightly below Wednesday's close.
Davutoglu said the fact that his mandate had been cut short was "not my choice but a result of necessity".
But he said he bore no grudges and urged the AKP, which has governed Turkey since 2002, to remain united.
Government spokesman Numan Kurtulmus and Justice Minister Bekir Bozdag, both Erdogan loyalists, are potential candidates to replace Davutoglu, three sources close to the presidency said. Transport Minister Binali Yildirim and Energy Minister Berat Albayrak, Erdogan's son-in-law, have also been touted, they said.
Presidential adviser Cemil Ertem said the economy would stabilize further when a prime minister more closely aligned with Erdogan took office. He said economic policy would not change, and that no election was likely before the government's mandate expires in 2019.
But a member of the AKP's executive board and a source close to the party both told Reuters an autumn election was the most likely scenario. The aim would be to win two-thirds of the 550 seats in parliament - a gain of 50 from the AKP's current 317 - to allow the party to change the constitution without the need for a referendum.
"Erdogan will move fast and try to reach enough of a majority for the executive presidency. A party structure and a leader who will design that will be put in place," the second source said. "He does not want to lose any more time."
The member of the AKP executive board, its main decision-making body, said Bozdag was the favorite and that the question of an early election would hinge on a leadership battle in the nationalist opposition MHP.
MHP leader Devlet Bahceli, a somber 68-year-old, is facing a challenge from Meral Aksener, a 59-year-old woman who served as interior minister in the 1990s.
Some opinion polls suggest Aksener could double the MHP's support, while under Bahceli it could drop below the 10 percent threshold needed to enter parliament, which would give the AKP a significant boost.
"The most likely alternative is an early election in October," the AKP board member said. "But if Aksener takes the (MHP) leadership, there may be no election until 2019."
Early election or not, Davutoglu's departure is likely to test relations with Europe just as Ankara implements a deal on stemming the flow of illegal migrants in return for accelerated EU accession talks, visa liberalization, and financial aid.
Davutoglu, who negotiated the deal and has largely delivered Turkey's side of the bargain, is seen in Brussels as the more liberal face of the Turkish government and more concerned about the rule of law.
EU officials involved in the deal were reluctant to be drawn on the implications of Davutoglu leaving, insisting that Ankara's existing commitments should not be affected.
"We will obviously discuss this first of all with the Turkish authorities and define together how to move forward," EU foreign policy chief Federica Mogherini said in Pristina, Kosovo, saying it was too early to assess the impact.
Additional reporting by Orhan Coskun in Ankara, Daren Butler, Humeyra Pamuk and Ayla Jean Yackley in Istanbul, Fatos Bytyci in Pristina; Writing by Nick Tattersall; Editing by Kevin Liffey