Gunmen attacked an annual Iranian military parade on Saturday in the country's oil-rich southwest, killing at least eight members of the country's elite Revolutionary Guard.

No group immediately claimed responsibility for the assault in Ahvaz, which saw gunfire spray into a crowd of marching guardsmen, bystanders and government officials watching from a nearby platform.

However, Iran faced a bloody assault last year from the Islamic State group and Arab separatists in the region have attacked oil pipelines there in the past.

Iran's state-run IRNA news agency said 25 people were dead.

Iran's Foreign Minister Mohammad Javad Zarif immediately blamed the attack on regional countries and their "US masters", further raising regional tensions as Tehran's nuclear deal with world powers is in jeopardy after President Donald Trump withdrew America from the accord.

"Iran will respond swiftly and decisively in defence of Iranian lives," he wrote on Twitter.

State television aired footage of the aftermath of the assault on Ahvaz's Quds, or Jerusalem Boulevard.