It was coming along quite nicely until the 1953 coup, organised by the CIA, deposed the democratically elected Prime Minister, Mohammed Mosaddegh. That opened the door for the Shah to return, which in turn created the circumstances for the theocratic revolution. Since the coup, Iran has only really had a semblance of democracy. The people elect presidents from a pre-approved group, but the Supreme Leader is not elected.