In exchange, Iran has agreed to freeze the most advanced parts of its nuclear program.
Check this out:

Iran has received its first installment of $500 million under the nuclear deal struck with the U.S. and five other nations, Deputy Foreign Minister Abbas Araqchi said Saturday.

The country is set to receive a total of $4.2 billion in frozen assets over the next six months. The deal, which went into effect Jan. 20, also suspends certain sanctions and allows Iran to continue exporting its oil at current levels, for a total of $7 billion.

“The first tranche of $500 million was deposited in a Swiss bank account, and everything was done in accordance with the agreement,” Araqchi told the ISNA news agency Saturday, according to the Agence France-Presse.