Whilst the Russians will never confirm the Iranian news agency reports they tipped Erdogan off about the coup even if they are true, the facts do point to a leak and it is plausible it originated in Russia.

Sergey Gladysh has written for The Duran a piece about the reports from the Iranian news agency Fars that the Russians tipped Erdogan off about the coup in the hours before it happened.

The Russians will never publicly confirm the truth of these reports, which concern the highly classified work of their intelligence agencies. However, consider the comments made about the reports by Dmitry Peskov, the Kremlin's spokesman:
"I don't have such information and I don't know the sources, to which the news agency Fars is referring."
Note that this is not a denial. As such it is the strongest indication to date that the Fars reports may be true. Peskov is almost certainly telling the truth when he says he doesn't know. However he would have presumably by now been told - and would have made a public denial - if the Fars reports were untrue.

If the Russians did tip off Erdogan about the coup that would explain many of its mysteries and would explain why it failed.

Here I should explain that I have some knowledge of the internal workings of coups because back in 1967 I was involved in one. One of the individuals the coup plotters who carried out the coup in Greece in 1967 wanted to arrest was my father. In the event he was abroad at the time, but in his absence my brother and I (aged respectively 3 and 6) were kept under house arrest for over a year. Though I was far too young to understand anything, every aspect of the coup was subsequently described to me exhaustively by various participants, and in light of what happened to my brother and to me I had a particular reason to pay close attention.

The reason the coup in Turkey failed was (1) because it was launched far too early in the night, when most people were still awake and were therefore able to hear the news about the coup and could be mobilised quickly to oppose it; and (2) because Erdogan and the other members of the government were not immediately arrested by the coup plotters, and were therefore able to organise the resistance almost from the moment the coup got underway.

That points to the coup having been launched prematurely as a result of a leak. Fars says the coup was supposed to start at 3:00 am - a far more appropriate hour for launching a coup than the late evening and a time when organising resistance to the coup would have been all but impossible because most people would have been asleep - whilst it is an acknowledged fact that Erdogan was not at his hotel when troops came to arrest him, whilst it seems that attempts to arrest other members of the government also took place, and that they too had fled just in time and were able to escape arrest.

There has been no really satisfactory explanation to date of why the coup began so early or of why Erdogan and the other members of the government were able to escape arrest. The Turkish General Staff is saying there was a leak but the international media at least is providing few details. If there was a leak, forcing the plotters to start the coup too early and causing Erdogan and the other members of the government to escape arrest, then that would explain everything.

Of course that does not prove that the leak originated in Russia. However the Russians do have a very sophisticated intelligence operation in Syria and for obvious reasons they would have been monitoring Turkish military communications closely - exactly as the Fars reports say. It is entirely plausible therefore that they overheard Turkish military wireless traffic discussing the coup and that they tipped Erdogan and the Turkish government off.

If the leak did originate in a Russian tip off it might also explain the conversation Putin and Erdogan held on Sunday 17th July 2016 - the day immediately following the coup. Contrary to some reports the conversation was held on Putin's initiative as the Kremlin report makes clear. However it seems to have been Erdogan's first conversation with a foreign leader following the coup. Note that at the time the conversation took place some military units that had been involved in the coup were still resisting, so Putin calling Erdogan in this way and acknowledging him as Turkey's leader would have been an important gesture of support. That probably was why the conversation took place.

The Kremlin report of the conversation does not go beyond banal generalities (such as the safety of Russian tourists in Turkey). However if the Russians really did tip off Erdogan about the coup that probably was one of the things the two men discussed, though the Russians - and the Turks - would obviously not want to disclose the fact.