The Shah rounded up, tortured and killed terrorists, obviously.
Islamist nut-jobs who wanted to overthrow his government and impose an Islamic Theocracy.
A lot of people told Jimmy Carter that he didn't really want "Democracy" in the middle east. It would instantly turn into an Islamic Theocracy, because that is what most of the people in the middle east support and believe.
The only way for those countries to be stable, and capable of interacting with Western countries is to have a dictator keeping the more militant Islamic radicals under control.
In Turkey it was Attaturk, in Iran it was the Shah, In Egypt it was Morsi, in Iraq it was Saddam Hussein, in Libya it was Quaddafi, in Syria it is Assad, and in Jordan it is King Abdullah.
All of these guys kept the REAL KOOKS under control. It was ugly, but nothing else will work in a society that embraces Islamic foundational principles.