Ayatollah Ali Khamenei was only the second leader of Iran's Islamic Republic, established in April 1979.