Iran is a perfect example of the "Law of Unintended Consequences."
Through CIA (Teddy Roosevelt's son Kermit), the US installed the Peacock Throne in 1953.
For 26 years this brutal satrapy detained and tortured dissidents with the CIA and Mossad trained SAVAK.
The result was the slow and steady elimination of the intelligentsia and academics, the moderates of Iran.
After the notorious Shah was overthrown, there were no moderate leaders to fill the leadership void.*
Senor military officers who did not flee Iran would have been seen as part of the ancien regime, so they ruled themselves out.
The one group of educated people with a network and who had considerable moral authority were the religious leaders, like Ayatollah Khomeini.
Hence the theocracy took hold in Iran.
Tehran immediately opposed two regimes: Israel and Suid-Afrika for their apartheid policies, not the US.
When Israel invaded southern Lebanon in 1982, the Shia Muslims were getting clobbered and their Amal militia was ineffective.
Iran began helping their co-religionists in southern Lebanon because nobody else in the world was.
That was the genesis of Lebanese Hezbollah.
*Napoleon filled the void after the French Revolution and the Reign of Terror. He rallied the citizenry who were now being attacked by the UK, Prussia, and other countries that wanted to reinstall the Bourbons. Lenin, Trotsky and finally Stalin did the same in post-Czarist Russia.