The deal was signed between Malaysia's SKS Ventures and the Pars oil and gas company, acting on behalf of the National Iranian Oil Company.
The contract is a follow up to a preliminary agreement reached in January to develop the Golshan and the Ferdows gas fields and build liquefied gas production plants.
The plants are due to be completed within 25 years and SKS Ventures will now own 50% of their output.
Golshan holds between 42 and 56 trillion cubic meters of gas in known reserves, and Ferdows has between 9 and 13 trillion.
This is the second large deal Iran has signed with foreign companies in the oil and gas sector this month. In early December, Iran's Petroleum Ministry and Chinese oil company Sinopec signed a $2 billion contract to develop the Yadavaran oil deposit, which holds 18.3 billion barrels in known reserves.
Developing energy cooperation with foreign companies is highly important for Tehran, which has been under pressure recently from the United States over its nuclear program.
The U.S. is seeking to impose sanctions on the Islamic Republic since Iran lifted a moratorium on uranium enrichment in January 2006. Washington suspects the country's nuclear program of being geared towards weapons production, although Tehran has repeatedly claimed it has only peaceful aims.