The attempt of the military coup in Turkey is undoubtedly linked to the country’s foreign and internal politics, which is not well accepted outside and inside the country, which showed this coup.
Turkish foreign policy success make troubles for outside forces which somehow will have to suspend operations of that country for which various measures, including a coup, will be taken, which is experienced and successful method for such cases.
Within the country, as can be seen not everyone that is pleased from the government: especially some part of the army and kurdish forces, as well as Gulen’s supporters who want to overthrow Erdogan’s government the day before. So in this coup the cooperation of these forces is not excluded.
Perhaps all this was unexpected for Erdogan because he has taken some steps in terms of making a serious cleansing and taking control of army since coming to power, but events proved that he failed. The problem is that the army is largely under the control of «Deep State» or Ergenekon and overcoming of this barrier to put it mildly is a serious problem.
The coup was of course aimed at overthrowing the government of Turkey and now it fails, but it does not mean that this will end. The forces that are interested in this issue will continue to make efforts to succeed and change Erdogan’s foreign and domestic policy.
Naturally some change in the situation in Turkey will led to rearrangement of regional forces here. Turkey will focus on domestic issues, while weakening external political activities in Syria, Iraq and in Nagorno Karabagh issue which will enable the RA and NKR get an advantage over Azerbaijan. This will also let the regional players especially Russia and Iran get an advantage over Turkey, and the global players increase their impact here and make the country more governable.
So the process won’t end with only this attempt of revolution. In the future we will witness various events that will not be positive for Turkey.