When I was in college, nearly 40 years ago, a Professor of mine discussed that role, and quoted a Turkish General on how the army planned to keep the Islamists down. If you cut off a snake’s head when it is little, it doesn’t get big.
The Professor was skeptical that the Turkish Army could make that policy work in the long term…
The Professor was right. That policy wouldn't work in the long term since the society is Islamic.