On this date in 1981, the Iran hostage crisis came to an end with the release of 52 Americans from captivity. Held for more than a year, the hostages, who originally numbered 66, served as pawns in a game of international brinkmanship between the Iranian revolutionary government of Ruhollah Khomeini and U.S. Pres. Jimmy Carter.

In the wake of the Iranian Revolution, anti-American sentiment was widespread in Iran, and the staff at the U.S. embassy in Tehran, which at one time numbered more than 1,400, was reduced to a skeleton crew of roughly 70. In February 1979, just weeks after deposed ruler Mohammad Reza Shah Pahlavi fled Iran, the embassy was besieged and briefly taken over by armed students. One Iranian embassy employee was killed, and a number of Americans were wounded. Iranian authorities assured the Americans that security around the embassy would be improved. However, as Britannica reports:

In October 1979 the U.S. State Department was informed that the deposed Iranian monarch required medical treatment that his aides claimed was available only in the United States; U.S. authorities, in turn, informed the Iranian prime minister, Mehdi Bazargan, of the shah’s impending arrival on American soil. Bazargan, in light of the February attack, guaranteed the safety of the U.S. embassy and its staff. The shah arrived in New York City on October 22. The initial public response in Iran was moderate, but on November 4 the embassy was attacked by a mob of perhaps 3,000, some of whom were armed and who, after a short siege, took 63 American men and women hostage. (An additional three members of the U.S. diplomatic staff were actually seized at the Iranian Foreign Ministry.) Within the next few days, representatives of U.S. President Jimmy Carter and Tehran-based diplomats from other countries attempted but failed to free the hostages. An American delegation headed by former U.S. attorney general Ramsey Clark—who had long-standing relations with many Iranian officials—was refused admission to Iran.

The U.S. responded by freezing Iranian assets and leveraging international support against the government in Tehran. On November 17, 1979, Khomeini ordered the release of 13 hostages, but the remaining captives were the focus of intense diplomatic and military efforts. As Britannica describes:

Almost from the beginning of the crisis, U.S. military forces started formulating plans to recover the hostages, and by early April 1980 the U.S. administration, still unable to find anyone to negotiate with in a meaningful fashion, was seeking a military option. Despite political turbulence in Iran, the hostages were still being held by their original captors in the embassy complex. On April 24 a small U.S. task force landed in the desert southeast of Tehrān. From that staging point, a group of special operations soldiers was to advance via helicopter to a second rally point, stage a quick raid of the embassy compound, and convey the hostages to an airstrip that was to be secured beforehand by a second team of soldiers, who were to fly there directly from outside Iran. The soldiers and hostages would then withdraw by air. However, the operation was fraught with problems from the beginning. Two of the eight helicopters sent for the operation malfunctioned before arriving at the first staging area, and another broke down on the site. Unable to complete their mission, U.S. forces sought to withdraw, during which one of the remaining helicopters collided with a support aircraft. Eight U.S. service members were killed, and their bodies, left behind, were later paraded before Iranian television cameras. The Carter administration, humiliated by the failed mission and loss of life, expended great energy to have the bodies returned to the United States. Secretary of State Cyrus Vance, who had opposed the mission, resigned in protest. All diplomatic initiatives in the hostage crisis came to a standstill, and the hostages were placed, incommunicado, in new, concealed locations.

A U.S. trade embargo, directed against Iran, followed, but it did little to resolve the diplomatic stalemate that the hostage crisis had become. The onset of hostilities with Iraq spurred the Iranians to return to the bargaining table, and indirect negotiations were carried out, with Algerian diplomats serving as back channel couriers for both sides. An agreement having been reached, the hostages were released on Jan. 20, 1981, just minutes after the inauguration of Pres. Ronald Reagan. The timing of the event led to speculation that Reagan’s campaign had sought to delay the release of the hostages in an attempt to undercut Carter’s reelection chances, but such allegations have been largely dismissed.