Then came the period between the elections of June 7 and Nov. 1. The sharp decrease in the AKP's votes in the June elections was due to many reasons, but Erdogan's team strongly signaled it was because the president was no longer the chairman of the party. Davutoglu's team, however, was adamant that it was due to Erdoganmania backfiring , and asked Erdogan to stay away from rallies and public campaigning. Although Erdogan's team was furious at this suggestion, it went along. And on Nov. 1 the AKP's votes reached a climax, in a way certifying that Davutoglu was now a democratically elected leader with significant support. Yet, a quick scan of the news shows that the AKP's Nov. 1 victory was not portrayed as Davutoglu’s popularity contest. Erdogan and his team did not forget how he was loudly and deliberately asked to remain behind the scenes.

Indeed, the bells had already tolled for Davutoglu on three remarkable occasions. First was in February 2015, when Suleiman Shah’s tomb was relocated from Syria. Davutoglu’s press adviser shared his photos with Turkish generals commanding the operation. That was a sharp blow to Erdogan's ego. The battle over who was the commander-in-chief was not one that Erdogan wanted to let pass easily, yet he seemingly did. Not many people could see Erdogan's resentment — even within his inner circle. Yet, like any shrewd politician, Erdogan was able to control his angst in public.

The blog post, however, does not explain all the details of the complicated relationship between the two men. Erdogan's team has been signaling that Davutoglu's expiration date was fast approaching for a while. One senior Ankara bureaucrat told Al-Monitor in bolder terms, "Davutoglu was to be recycled, we all knew; the question was not if, but just when. It could have been later but certain events expedited the process."

But the blog post was nothing surprising for keen observers of the AKP, especially because it was most likely posted with President Recep Tayyip Erdogan 's approval.

Turkish Prime Minister Ahmet Davutoglu is stepping down and the ruling Justice and Development Party (AKP) will hold an extraordinary congress on May 22 to elect a new chairman and prime minister. Davutoglu will not be one of the candidates on the ballot. Sources in Ankara explain the process as the graceful exit of Davutoglu from a messy situation and preserving the AKP's status. Al-Monitor columnist Mustafa Akyol has provided a succinct account of the May 1 Pelican Brief blog that rocked Ankara and led to Davutoglu's downfall.

As the Pelican Brief blog highlighted, there were several events where Davutoglu's freewheeling angered Erdogan. In almost all instances Davutoglu was put in his place promptly and diligently. The relationship had an odd pattern: The prime minister would go public with a bold statement, only to be belittled by the president and then having to retract his words. What would follow this strange tango would be a declaration of love and commitment from Davutoglu to Erdogan with pledges of unity, solidarity and brotherhood.

This pattern had become so routine that when a prominent pro-AKP pundit, Nasuhi Gungor, spilled the beans on April 21 during a show on a pro-AKP TV channel, not many took him seriously. Gungor bluntly said that "[the political process] can no longer continue with Davutoglu." He became an instant target of pro-Davutoglu media outlets, scolding him to the point of social lynching. And this was in and of itself a crucial signal that Davutoglu's men had established a nascent media network competing with Erdogan's.

Finally, and possibly the most crucial event that escalated the Erdogan-Davutoglu tension, was trouble-making by the Americans. The word in Ankara is that the cold shoulder Erdogan received in Washington got even colder with the warm American treatment for Davutoglu. It may be viewed differently in Washington, but how it is perceived in Ankara is all that mattered. Erdogan and his team grew suspicious of Davutoglu's appointment with US President Barack Obama, scheduled for May 5.

Erdogan's camp feared a possible victory lap by Davutoglu, after which he would try to maximize some of his more formal powers as prime minister. In order to prevent a power grab, it looks like Erdogan put Davutoglu’s termination on fast track and pulled the plug on him while he was visiting Doha, Qatar. When Davutoglu came back on April 29, he learned that he was about to be stripped off his most important powers as party chairman — appointing provincial and district heads. The AKP’s highest authority, the Central Decision and Executive Board (MKYK), handed the humiliating decision to Davutoglu for his approval. Despite multiple pleas to Erdogan, Davutoglu failed to rectify the disaster. What must have hurt Davutoglu’s team the most was the fact that out of 50 members of the board, 47 signed the decision, and three members deemed too close to Davutoglu were not even consulted. Not one of the 47 MKYK members bothered to inform Davutoglu or his people about the process.

Now that Davutoglu is leaving, what are the possible repercussions? Here are a few:

Who replaces Davutoglu is not important — what matters is the expiration date on the new prime minister. The answer will come when the executive presidency is established. Once the new constitution is in place, there will most likely not be a position for a second man in the system.

Davutoglu is said to be the main architect of Turkey's failed Syria policy. Davutoglu's forced departure may indeed provide a graceful exit to Erdogan from the Syrian morass. Davutoglu is seen as a political figure but not a policymaker. His critics blame the Syrian mess on Davutoglu's love for grand rhetoric, which they say lacks substance. One seasoned Ankara-based reporter said, "He has big words but no one to carry his words even in his own party's management." A possible change in Ankara's Syria policy may mean better relations with the United States, Russia and maybe even Iran.

Several columnists such as Ceren Kenar were quite upset with critical pundits who called her and her colleagues pro-AKP columnists. I personally owe her an apology because the Pelican Brief set the record straight — Kenar was not pro-AKP, but pro-Davutoglu. Now that Davutoglu is departing, the question among the pro-Davutoglu crowd is, which one of them will be worthy to be co-opted to Erdogan’s side?

The race among Davutoglu's men to step on each other has begun.