Iran's pistachio industry had been in turmoil, with its product close to being slapped with a ban in the the European Union.
The head of Tehran's Chamber of Commerce, Mohammad Reza Behzadian, said that in April Brussels gave Iran 40 days to cut aflatoxin levels in the greenish-red split shell nuts.
Aflatoxin is a substance found in mold and has been linked to cancer in the liver and kidneys. Along with nuclear proliferation, human rights abuses and terrorism, the topic has ranked among the top issues being discussed with the European bloc.
The fear of a ban prompted fresh talks in late May, where Iran reportedly earned a reprieve.
"Iran has committed itself to reduce contamination," explained Behrouz Qaybi, the head of the pistachio unit at the Iranian agriculture ministry.
Iranian sources said the EU has now given Iran six more months to reduce from 16 to 10 percent the quantity of consignments rejected by the EU, which currently tests all imports.
In return, the EU has promised technical expertise in the production chain, especially in the handling process where mold can develop. The ultimate aim is to end the present checks on all shipments and replace them with random testing.
"The EU is closely watching Iran's performance and will let us know later how they see the situation," said one official from Iran's Nut Exporters Union.
The EU applies the some of the strictest regulations in the world on acceptable aflatoxin levels -- four parts per billion as opposed to 10-15 ppb in most other importers -- which Iran complains is unfair.
In 1997, the EU suspended imports for three months after detecting contamination 200 times above the norm.
Iran is the world's number one pistachio producer, claiming to hold 50 percent of the market. Pistachios, along with carpets, caviar and saffron, are a source of national pride and a top non-oil export.
An EU ban would not be a fatal blow, given that only around 16 percent of Iranian production goes to the EU.
However, the fact that a small but sizable percentage of these exports are being rejected means that shipping costs are increased and the nuts are being sold on to third countries at half price, Nut Exporters Union head Mohammad Hassan Shamsfard said.
An export increase last year saw the salty nuts overtake the carpet industry -- a sector that has hit the doldrums amid tougher competition -- as the number-one non-oil export.
With competition from the United States also increasing, the label of cancer risk could deal a major image blow, placing at risk the current 803 million dollars in annual revenue.
"When a consignment is rejected, we have to pay the client back, and the client will then look for another supplier," said Hossein Niku, director of the Amin Padidar pistachio company.
And exporters are also complaining that political concerns are beginning to hit the pistachio trade.
"One diplomat told me that Iran would be better off to start looking at the nuclear problem," one exporter said.