A prisoner exchange agreement between the United States and Iran allowed five prisoners sought by the US to fly out of Tehran, with Iran receiving access to $6 billion in oil revenues frozen under US sanctions and five Iranian nationals released from US custody.