The resignation of Hakan Fidan, who has headed the National Intelligence Agency (MIT) since 2010, could herald a major reshuffle of the Turkish government after June 7 legislative elections.
Turkey's press have in the last days speculated feverishly that Fidan's standing as an MP would set him up to become the new foreign minister, a move that would give a higher profile to Turkish diplomacy.
His resignation has been accepted by Prime Minister Ahmet Davutoglu and will take effect on Tuesday, Anatolia added.
Davutoglu had in a television interview last week lavished praise on Fidan, describing him as "brave and bold and not going back once a step is taken."
Also Read
Seen only occasionally in public and rarely making public comments, Fidan has emerged as one of the most powerful men in Turkey under Erdogan.
As head of the MIT, he has led negotiations with Kurdish militants for an end to a decades-long insurgency and has been a key player in Turkey's policy on the Syria crisis. He was also instrumental in controversial talks that secured the release in September of almost 50 Turkish diplomats, staff and their families who were kidnapped by Islamic State (IS) jihadists at the Turkish consulate in Mosul in Iraq.