In reply to Timmd:
> It's part of their constitution that the military can act to keep Turkey secular.
No it isn't. The military like to think that it is, but it isn't. Like any decent secular constitution, the guarantee is legal, and the military is subordinate to the executive. The extent to which the military have political power is a consequence of previous military dictatorships, and despite what many seem to think, military dictatorship is rarely a protection for democracy. The fact that all the major opposition groups opposed the coup, despite the dire situation in Turkey, tells you a lot about this legacy.
Sad though it is, Erdogan has popular support. If there were army officers who wanted him gone, then they would have been better advised to resign their commissions and run for office themselves rather than driving tanks over unarmed protesters in the streets. As it happens, all they have achieved is to hand Erdogan the excuse he needed to tear up the rule book and rewrite it the way he wants. A sad day for Turkey.