Ayatollah Ali Khamenei ruled Iran for decades. His supporters saw him as a wise leader, his critics as an authoritarian who led the Islamic republic into further international isolation. His latter years as supreme leader were marred by mass protests and a brutal crackdown that killed thousands.