Tehran (AFP) - A top Iranian army commander said Monday that his troops would take "decisive" action if Islamic State group militants come within 40 kilometres of its borders with Iraq and Afghanistan.

Iran, the major Shiite power in the Middle East, is heavily involved in conflicts in Syria and Iraq against the jihadists, primarily Sunni Muslims who denounce Shiites as apostates who must be killed.

The comments from General Ahmad Reza Pourdastan, who heads Iran's ground forces, came after Iraq's foreign minister said intelligence sources showed Iran was among countries IS had plans to attack.

The remarks came after IS claimed responsibility for Friday's gun and bomb attacks in Paris which killed 129 people.

"The Iraqi foreign ministry warned us but the Islamic Republic of Iran's army states that it has no fear of such threats and a red line has been drawn in Iraq 40 kilometres (25 miles) from the border," Pourdastan said.

France, the United States and Iran were among the countries that Iraqi Foreign Minister Ibrahim al-Jaafari said IS had targeted.

"We have strongly warned that if any action is taken (by IS), it will face a decisive response from Iranian armed forces and we will do the same in Afghanistan," Pourdastan said, quoted by state media.

"Today part of Daesh is in north Afghanistan and interested to approach Iran's border but the Iranian nation should rest assured that its sons in the army, the Guards, and police are ready," he added.

"Before the enemy reaches borders, its actions will be neutralised."

Iran's Revolutionary Guards Corps, which is independent of the army, has advisory missions in Iraq and Syria at the invitation of the Baghdad and Damascus governments.

Pourdastan's statement comes just weeks before Iranian pilgrims prepare to travel to Iraq for the annual Arbaeen commemorations, which have been targeted by militants in past years.

Almost one million Iranians have signed up online to attend this year's 70-kilometre religious walk between Najaf and Karbala on December 2, marking the death of Imam Hussein.

Local media reports say up to three million Iranians may participate.