Separate from the nuclear deal (JCPOA), the U.S. settled a 37-year-old legal dispute over a failed arms deal from the 1970s. The principal ($400 million) was Iran’s own money, originally paid to the U.S. for military equipment before the 1979 Revolution. The equipment was never delivered, and the U.S. froze the funds. $1.3 billion was the negotiated interest accrued over nearly 40 years. U.S. lawyers argued that settling was better than risking a much higher ruling (potentially billions more) from an international tribunal at The Hague. Because of existing sanctions and the lack of a SWIFT banking relationship, the $400 million was delivered in physical pallets of foreign currency (Euros and Swiss Francs) on an unmarked plane.
It was their own money, plus interest.