I remember Reagan colluded with the Iranians to win his election. Carter had tried to negotiate with the Iranians to free the embassy hostages. But Iranians did not release them until after he lost the election. Reagan is thankful for that. 

The Iranians got too greedy. Since things went so well with Carter they thought Reagan would be even more generous - a little like the Nixon peace with China. They were wrong. Even though they returned the captives, relations were very poor with the US ever since then.