Iranian President Hassan Rouhani has warned of a 'deluge' of drugs, refugees and attacks on the West as he lashed out at 'unjust and illegal' US sanctions.

Rouhani threatened on live state television: 'I warn those who impose sanctions that if Iran's ability to fight drugs and terrorism are affected ... you will not be safe from a deluge of drugs, asylum seekers, bombs and terrorism.'

President Donald Trump pulled the U.S. out of a multilateral nuclear deal with Iran in May and reimposed sanctions on Iran's vital oil industry last month.

Rouhani is providing military support - including funding proxy terrorist groups - and sending oil to Syria's President Bashar al-Assad in his vicious civil war.

The Iranian President lashed out at US sanctions which he says will only come back to wreak havoc on Western countries

Iranian President Hassan Rouhani said: 'You will not be safe from a deluge of drugs, asylum seekers, bombs and terrorism'

Drug trafficking is a serious challenge for Iran which borders Afghanistan - the world's largest opium producer - and Pakistan, a major transit route for drugs.

'We spend $800 million a year to fight drugs which ensures the health of nations stretching from Eastern Europe to the American West and North Africa to West Asia. Imagine what a disaster there would be if there is a breach in the dam,' Rouhani said.

In 2012, Iran accounted for two thirds of the world's opium seizures and one fourth of heroin and morphine seizures, a U.N. report published in 2014 showed.

'We have been just as determined in the fight against terrorism ... sacrificing hundreds of valuable troops and spending millions of dollars annually,' Rouhani said.

'We don't expect the West to pay their share, but they should know that sanctions hurt Iran's capacity to fight drugs and terrorism,' Rouhani added.

Rouhani: 'Imagine what a disaster there would be if there is a breach in the dam'

At a meeting of heads of parliaments of China, Russia, and four other countries, Rouhani said on Saturday: 'Economic terrorism means creating horror in a country and create fear in other countries that intend to invest (there). America's withdrawal from the (nuclear accord) is undoubtedly a clear example of economic terrorism.'

More than 700,000 undocumented Afghans have returned from Iran this year as the Iranian economy tightens, according to data from the U.N's migration agency, and Iranian media said some Afghans were seeking to enter Turkey to reach Europe.

Iran's huge landmass is the bridge to Europe for many migrants and drug traffickers, who move in from Afghanistan and Pakistan to the east and cross from the western border of Iran into Turkey and the Caucasus.

Separately, Foreign minister Mohammad Javad Zarif was quoted as saying that the United States is selling more arms into the Middle East than the region needs, making it a 'tinderbox'.

Zarif warned about the dangers of large U.S. arms sales in the Middle East, where Iran's regional rival Saudi Arabia is a major buyer of Western weapons.

'The Americans have turned the region into a tinderbox. The level of arms sales by the Americans is unbelievable and much beyond regional needs and this points to the very dangerous policies followed by the Americans,' IRNA reported Zarif as saying.