On this date in 1981 the Iranian government finally released the last 52 of the 66 hostages it took when Iranian students/paramilitaries seized the US embassy in Tehran in November 1979. The Carter administration, when it wasn’t busy planning botched rescue operations, spent most of the 444 days those hostages were held captive trying to negotiate their release, but complications arose over and over again. The biggest complication by far was that Ayatollah Khomeini saw that embracing the embassy seizure made for good domestic politics, allowing him to consolidate his power in the chaotic aftermath of the Iranian Revolution. The crisis was extraordinarily damaging to President Carter, who was running a tight race for reelection against Ronald Reagan, who spent the summer of 1980 insisting that he would never “pay ransom for people that had been kidnapped by barbarians” (this was a principle in which he obviously believed very deeply).
Negotiations finally started to crystallize around the time the Iran-Iraq War began, and with Algerian mediation (the Iranians refused to have direct contact with the Americans). What eventually emerged was the so-called “Algiers
Divorce Accords,” a comprehensive division of communal property arrangement that worked out several points of dispute between Iran and the US apart from just the hostages. By the terms of the accords, the hostages were to be freed in exchange for a US pledge not to intervene in internal Iranian affairs, to unfreeze Iranian assets, and to lift all sanctions it had put in place when the hostages were initially taken. Iran agreed to pay the claims of American firms that had lost assets due to the revolution, and the two countries established an international tribunal for hearing claims made by one country’s citizens against the other country.
The hostages were released (purely by coincidence, now, don’t get any funny ideas) at roughly the moment Ronald Reagan finished his inaugural address on January 20. They flew to a US Air Force base in Germany for medical check-ups, where they were greeted by (now former) President Carter. They’d been scheduled to leave Iran the day before (the accords document specifically says “January 19, 1981”), but some kind of last-minute dispute about the terms of the Algiers Accords supposedly prompted the Iranians to hang on to them for an extra day.
You don’t need to get into conspiracy theories about the Reagan campaign to think that the Iranians might have delayed the hostages’ release intentionally, as a final knife to Carter’s ribs. The Iranians still resented Carter for allowing the (by this time dead) Mohammad Reza Shah Pahlavi to come to the US for medical treatment after he’d fled Iran. It’s said that Carter really wanted to see the hostage crisis ended before he left office, so ending it a few minutes into his replacement’s term was, intentional or not, a pretty big insult.