BEIRUT, Sept 6 (Reuters) - The National Iranian Oil Company (NIOC) signed a 42 million euro contract with France's Sofregaz Wednesday for the recovery of flare gas at a refinery at South Pars, the world's largest gas field, the Islamic Republic News Agency (IRNA) reported on Wednesday.

Iran's Samin is also a signatory to the deal, which is expected to take 30 months to complete.

France's Total signed a deal with Tehran in July to develop phase II of South Pars, marking the first major Western energy investment in the Iran since the lifting of sanctions against it.

Total will be the operator with a 50.1 percent stake, alongside Chinese state-owned oil and gas company CNPC with 30 percent, and National Iranian Oil Co subsidiary Petropars with 19.9 percent.

The project will cost up to $5 billion and production is expected to start within 40 months, Iran's oil ministry said in a statement at the time.

(Reporting by Babak Dehghanpisheh; editing by Jason Neely) ((babak.dehghanpisheh@thomsonreuters.com;))