ANKARA (Reuters) - Hundreds of thousands of Iranians chanted “Death to Israel” in nationwide rallies on Friday at which they also burned flag of the Islamic State militant group which claimed responsibility for attacks in Tehran this month, state TV reported.

Slideshow ( 8 images )

Iranian state media said millions of people turned out for the rallies to mark Al-Quds Day that was declared by Iran’s 1979 Islamic revolution founder Ayatollah Ruhollah Khomeini and which is held on the last Friday of the Muslim fasting month of Ramadan.

Opposition to Israel is a touchstone of belief for Shi’ite-led Iran, which backs Palestinian and Lebanese Islamic militant groups opposed to peace with the Jewish state, which Tehran refuses to recognize.

Israel, the United States and its chief Sunni Arab ally Saudi Arabia accuse Iran of fomenting tension in the Middle East and of sponsoring terrorism. This is denied by Tehran.

Tensions have risen sharply in the Gulf between Qatar and four Arab states, including Saudi Arabia, in part over Doha’s links with Iran.

“This year’s rally ... shows people want our region to be cleaned up from terrorists, backed by the Zionist regime (Israel),” President Hassan Rouhani told state TV.

State TV covering the rallies showed crowds chanting anti-Israel slogans in solidarity with Palestinians whom they urged to continue their fight against the “occupying regime”.

Demonstrators chanted “Death to Israel, Death to America,”, carrying banners reading “Israel should be wiped off the map” while people were shown burning the Israeli flag.

People meted out the same treatment for the banner of Islamic State (IS) which has said it carried out deadly twin attacks in Tehran on June 7. Iran blames regional rival Saudi Arabia for being behind the attacks. Riyadh denies this.

“Daesh (IS), America and Israel are all the same. They are all terrorists,” a young woman marcher in Tehran told TV.

Marchers included soldiers, students and clerics. Black-clad women with small children were among those flocking the streets of central Tehran, many carrying portraits of Khomeini and his successor Supreme Leader Ayatollah Ali Khamenei.

In Tehran’s Vali-ye Asr street, three mid-range surface-to-surface ballistic missiles were displayed, including the Zolfaghar missile that Iran’s elite Revolutionary Guards used on Sunday to target bases of the IS in eastern Syria.

Top Guards’ commanders have repeatedly said that Israel is within range of Iran’s missiles. Sunni Muslim states in the Gulf and Israel say Tehran’s ballistic missile program is a threat to regional security and has led to the United States imposing new sanctions.

“With this rally our nation is telling America that we are determined to continue our path,” Rouhani said, referring to the U.S. Senate’s decision to impose new sanctions.