ISTANBUL  - Four generals, including a former deputy chief of staff, accused of ousting Turkey’s first Islamist prime minister in 1997 in a coup, were put under pre-trial detention on Monday, the latest move against a once all-powerful military.

Prime Minister Tayyip Erdogan’s Justice and Development Party (AKP), which itself has Islamist roots, has sought to curb the military’s political influence and prosecutors have pursued officers suspected of plotting against current and former governments.

An Ankara court decided over the weekend that former deputy chief of staff Cevik Bir and other officers should be held under pre-trial detention to remove any risk of them fleeing, having ordered on Thursday they should be questioned over their role in the overthrow of prime minister Necmettin Erbakan 15 years ago. A total of 18 former officers were detained pending trial on Sunday and in the early hours of Monday, state-run Anatolian news agency reported on its website. There is no provision for bail in Turkey, and pre-trial detention can drag on for months.

The suspects are being held in prison at Sincan, a town outside Ankara where the military ordered tanks onto the streets in 1997 in what became known as the “post-modern” coup because, unlike three earlier coups, the military did not resort to the actual use of force. Erbakan, who died of heart failure aged 85 in March last year, pioneered Islamist politics in Muslim but strictly secular Turkey and paved the way for the subsequent success of Erdogan’s socially conservative AKP.“ Those who have  made this country pay great prices, put this country under great burden, will account for that before the courts,” Erdogan said on Sunday.

“Everyone should understand that Turkey is not the old Turkey anymore. Turkey is no longer a country where anyone who gets up early can stage a coup,” he said.

Many AKP leaders, including Erdogan, had belonged to Erbakan’s party before it was banned.

Having swept to power in 2002, the AKP has eschewed the Islamist label and Erdogan denies having any ambition to turn Turkey into an Islamist state, though he wants to make young Turks more religious.

Generals had long seen themselves as the guardians of the secular state envisioned by Mustafa Kemal Ataturk, the soldier statesman who founded the modern republic out of the ashes of the Ottoman empire in 1923, but their repeated interventions were criticized for slowing the development of democracy.

Hundreds of military officers, including top serving and retired commanders, are now facing trial, accused of involvement in coup conspiracies against Erdogan and his party.

This month, the landmark trial began of former General Kenan Evren, now 94, who led a coup in 1980 that led to the execution of 50 people, the torture of thousands, and the disappearance of hundreds more in three years of military rule. Evren was too frail to attend the opening of the trial.