These events led the persian government to enter negotiations with the U.S., with Algeria acting as a mediator. The hostages were formally released into United States custody the day after the signing of the Algiers Accords, just minutes after the new American president, Ronald Reagan, was sworn into office.