What were the details behind the US hostages held by Iran being released exactly on the day of Reagan's inauguration?

by NotSure2505

I remember watching this live on TV as a kid, and it was remarkable split-screen moment but what puzzled me was that no one really seemed to say much about why both events were happening on exactly the same day, in real time, in fact within minutes of Reagan taking the Oath of Office.
I have since read that immediately on Reagan taking office, $8 billion was released to the Iranian government, so I assume this was in the works since the election. How was this carried out mechanically? Was it arranged in advance, and if so, how? It seems like it was scripted to go off automatically, just waiting for the formal moment of the Oath being administered. How did the incoming administration accomplish this?
What did the Carter administration have to say about it, and how did the Reagan transition team accomplish this bargain when Carter had been unable to for more than a year?
How did it proceed during the final days of Carter's time in office? Did Carter just step aside?
Finally, I'm going to assume the timing of the two events was not a coincidence, so what planning exactly led to this?

Pasha_PubliusKhan

This sort of comes down to who you ask. The Iranian leadership hated Carter. This came down to Carter's decision to admit Iran's former Monarch, the man who was overthrown by Khomeni, into the United States for medical treatment. Many people in Iran interpreted this as a sign the United States would attempt a coup to put the Shah back in the power. The truth was the Shah was dying and would be dead within the year.

The hostage crisis was a huge issue in the 1980 presidental election and Reagan was talking a big game. Reagan was threatning to use force to recover the hostages, something Carter, after a failed rescue attempt, was reluctant to do.

Reagan fans will tell you they the Iranian government released them because they were afraid of Reagan.

The Iranian's themselves claimed it was a metaphorical middle finger, revenge for admitting the Shah into the United States.

There is also indications from Iranian sources that the Iranians were attempting to start off on the "right foot" with the new Reagan administration.

Source: The Iranian Revolution: the Islamic Revolution That Reshaped the Middle East. Createspace, 2014.

Edit: /u/khowaga points out in the below comment that Reagan had been promising to release funds frozen by the United States government in exchange for the hostages.

This got scuttled due to the outbreak of the Iran-Iraq war, in which the United States initally took Iraq's side.