The announcement that Turkey's powerful spy chief, Hakan Fidan, will be a candidate for parliament for the ruling AK Party has exposed an unprecedented political rift between the country's president and prime minister.

President Recep Tayyip Erdogan has criticized the decision, while Prime Minister Ahmet Davutoglu has strongly defended the candidacy. Davutoglu and Erdogan come from the same party.

Political scientist Yuksel Taskin of Istanbul’s Marmara University said there is reason for Erdogan’s public criticism of Fidan’s decision.

"He is increasingly suspicious about everybody around himself - quite typical to leaders who try to consolidate all power in their hands," he said. "I think he turned to be suspicious [of] Davutoglu and Hakan Fidan [as] a kind of collaborating for the future. In that future he may [be] considering that there is no place for Erdogan. So he is bit terrified from this possibly."

Hakan Fidan was a close confidant to Erdogan for more than a decade. Heading Turkey’s National Intelligence Agency or MIT, he was a key player in brokering peace efforts with the Kurdish rebel group, the PKK.

Diplomatic columnist Semih Idiz of the Turkish newspaper Taraf and Al Monitor website said Fidan, who also masterminded policy towards Syria, could pose a potential threat to Erdogan’s political ambitions.

"Given Erdogan’s plans of becoming an executive president, I think he wanted somebody who he is very close to and who is privy to his secrets at the helm of the intelligence service," he said. "And another reason: once Hakan Fidan is in politics, of course given the vagaries of politics and the fact that Erdogan has said that 'he holds all my secrets', you can never be sure what this will mean in the future."

Erdogan is calling for change in the constitution to turn Turkey from a parliamentary to a presidential system. Political observers say although Davutoglu has voiced support for such a change, he and other senior members of the ruling AK Party are believed to be less than enthusiastic.

Asli Aydintasbas, a political columnist for the Turkish newspaper Milliyet, said Fidan entering government would strengthen Davutoglu's position and would mean that Davutoglu, the current prime minister, would be able to form "a very strong Cabinet after the elections."

He said some other heavyweights would also be included.

"That is a vote for the parliamentary system, whereas President Erdogan would like to switch to an executive presidency," he added. "Therefore it's two conflicting visions ... Erdogan is feeling slighted by this. He is not use[d] to Ahmet Davutoglu, the prime minister, or anybody else not saying yes to him. I think this maybe a first."

The very public difference between the prime minister and president over Fidan’s decision to run in upcoming elections could be the indicator of far wider, simmering tensions within the ruling AK party, said Taskin.

"There are increasing signs from certain established people of the party, including signs [of] criticism towards Erdogan - they don't express themselves directly, but they make themselves clear that they don’t like one-man autocratic tendencies in the system," he added

Taskin suggested that there is increased "likelihood that the tension may explode into something that is not easy to control."

One of the strengths of the ruling AK Party is that it's remarkably adept at containing political differences and presenting itself as unified and disciplined to the public.

But with opinion polls showing the party's own supporters deeply divided over turning Turkey into a presidential system, analysts warn that managing such differences could yet be its biggest challenge.