A historical post on Iran-US relations before the US Embassy hostages incident, in 1979, by a respected British-Iranian academic:
Throughout 1979, and in stark contradiction to the narrative of mutual animosity, the US had began a series of intelligence briefings for the provisional government of Iran. These briefings were to be substantive and detailed. In late October US intelligence briefings warned the Iranians that Saddam Hussein was preparing for an invasion and that adequate measures needed to be taken to deter any attack. According to Mark Gasiorowski, the briefing was delivered on 15 October with a follow up on the 18th.[4] Two days later Carter took the decision to allow the Shah in for medical treatment. The rest, we might say, is history.
The footnote refers to:
[4] For more details on this fascinating part of US-Iran relations see Mark Gasiorowski's excellent article, US Intelligence Assistance to Iran, May-October 1979, Middle East Journal, Fall 2012.
The quote comes as the final paragraph in a review of the film 'Argo':http://www.rusi.org/analysis/comment.../#.US5bseuAuXT