Turkey's former top spy says withdraws from June election
Fidan's announcement a month ago that he planned to be a candidate for Erdogan's ruling AK Party triggered an apparent rift at the top of the party.
Erdogan, who is required by the constitution to remain above party politics as head of state, said he did "not view Fidan's candidacy positively", although he acknowledged at the time that it was a matter for Prime Minister Ahmet Davutoglu.
In a brief statement Fidan, who had been seen by some as a possible future foreign minister, gave no reason for the withdrawal of his candidacy.
"On the path of service to my nation and my people, I will always try to properly fulfil the duties entrusted to me," he said in the statement, in which he also thanked Erdogan and Davutoglu for their "support".
A source in Davutoglu's office said the prime minister had discussed Fidan's withdrawal with Erdogan and had approved the move.
Erdogan, elected president last August after serving more than a decade as prime minister, has made little secret of his determination to keep a firm grip on politics and the AK Party.
Erdogan wants the AK Party to secure a stronger majority in the June vote in order to help push constitutional changes through parliament and forge a full-fledged presidential system in Turkey, where currently the prime minister holds more power.
(Reporting by Gulsen Solaker; Writing by Ece Toksabay; Editing by Nick Tattersall and Gareth Jones)