Gen. Kenan Evren, who led a military coup in Turkey and then imposed the harshest repression in his country’s history, leading to his trial and conviction more than 30 years later, died on Saturday in a military hospital in Ankara. He was 97.

His death was reported by the state-run Anadolu Agency.

By the time of the coup, on Sept. 12, 1980, Turkey had fallen into near anarchy. Political gangs fought one another, and the sound of gunfire and bombings became almost routine. Military commanders feared that something akin to the 1979 Iranian revolution could explode in Turkey and destroy the existing order. Violence had reached such a peak that many Turks welcomed military intervention.

Few, however, were prepared for what followed.

Presiding over a five-man junta, General Evren declared himself head of state and imposed martial law. More than 500,000 Turks were jailed on political charges, including many of the country’s intellectuals and artists. Torture was common.

“The policy was not necessarily to kill you in jail,” said one former prisoner, the painter Orhan Taylan. “They would abuse you to the point of death, then release you so you would die soon on the outside.”