GENEVA/LONDON (Reuters) - An attack on a military parade in Iran is a blow to the image of its Revolutionary Guards, but the elite force could yet turn the bloodshed to its advantage, using public sympathy to bolster itself at the expense of President Hassan Rouhani.

Twelve Guards were among 25 people killed on Sept. 22 when gunmen fired on a viewing stand as military officials watched a ceremony in the city of Ahvaz marking the start of Iran’s 1980-1988 war with Iraq.

The bloodshed exposed vulnerabilities of the Guards, custodians of clerical rule since the 1979 Islamic Revolution, who have sought to project an image of invincibility.

Initial responses from ordinary Iranians have been largely sympathetic, however, with many posting on social media to express support for the security forces.

“The fact that the attack took place on the anniversary of Iraq’s invasion of Iran is likely to prompt a nationalistic backlash among Iranians,” said Ali Vaez, Iran Project Director at the Crisis Group think-tank. Iran lost hundreds of thousands of soldiers in the war with Iraq.

Pictures of soldiers shielding women and children with their bodies or carrying them away from the scene were widely shared, while more than 20 newspapers used a photograph on their front pages of a commando cradling a baby while holding an AK-47.

“See how a member of the Revolutionary Guards helps a child without fear. Salute to your courage!” read one Twitter post, typical of thousands.

But a small number of Iranians shared pictures of the harsh suppression of protests in 2009, when the Guards shot and ran down civilians in the streets.

The public reaction was similar to that seen last year after Islamic State militants attacked Iran’s parliament and the mausoleum of the Islamic Republic’s founder Ayatollah Ruhollah Khomeini, killing 18.

ROUHANI COULD BE LOSER

The Ahvaz incident could prove more of a setback for Rouhani, a pragmatist leader whose position within Iran has been severely weakened by the U.S. withdrawal from a nuclear deal with world powers that he engineered and which the Guards and other hardliners opposed.

“The Guards will blame Rouhani for the lax situation and shore up their own agenda in the country,” said Ali Ansari, director of the Institute for Iranian Studies at the University of St. Andrews.

“Rouhani is a lame duck. He’s long lost the possibility of challenging the Guards,” Ansari added.

FILE PHOTO: A general view shows an attack on a military parade in Ahvaz, Iran, in this September 22, 2018 photo by ISNA. The photo is watermarked from source. ISNA/Iranian Students' News Agency/Social Media/via REUTERS

“He lost it with the [nuclear deal] and they’ve hammered him. That’s the one gift that [U.S. President Donald] Trump has given to the Guards, further ammo.”

The attack is nevertheless an alarming security breach for the Guards, who influence Iran’s approach to its neighbors and control a multi-billion-dollar stake in the economy.

The Ahwaz National Resistance, an Iranian ethnic Arab separatist movement, and Islamic State have both claimed responsibility, though without presenting evidence.

Supreme Leader Ayatollah Ali Khamenei said the five gunmen were paid by Saudi Arabia and the United Arab Emirates, and that Iran would “severely punish” those behind the violence. Saudi Arabia and the UAE are predominantly Sunni Muslim while Iran is mostly Shi’ite Muslim.

Saudi Arabia and the UAE have rejected Khamenei’s allegations.

History suggests the Guards will react by oppressing dissidents, an approach that political activists warn could fuel further violence in the southwest, where the attack took place, and where long-standing grievances have led to sporadic protests.

To deflect attention away from Iran, they may strike abroad, an approach used by the Guards before.

On Sept. 8, they fired seven missiles at a Kurdish opposition group in northern Iraq, killing 15 people. The judiciary executed three Kurdish dissidents hours later.

The two actions were intended as a message to Iran’s Kurdish community after recent militant clashes with security forces and can be seen as a blueprint for the Islamic Republic’s likely response to the parade attack.

REGIONAL RIVALRIES

Iran has had tense relations with its minorities, including Kurds, Arabs, Azeris and Baluch, and has accused them of aligning with neighboring countries rather than Tehran.

The missile attack against the Kurdish opposition group was also a warning to Iran’s foes Saudi Arabia, Israel and America, analysts, activists and opposition groups say.

Iran and Saudi Arabia are engaged in a battle for influence in the Middle East, backing opposing sides in the conflicts in Yemen and Syria as well as rival political groups in Iraq and Lebanon.

An Islamic State cell could have also carried out the parade attack, said an Iraqi military intelligence officer, who asked not to be named because of the sensitivity of the issue.

After recent military defeats in Iraq, some of Islamic State’s leadership crossed the mountainous border into Iran, heading for Afghanistan and Pakistan, said the officer, who has participated in the interrogation of Islamic State detainees.

They may have helped form and train small groups to launch guerrilla attacks.

“[Islamic State] managed to launch terrorist attacks in the West through its self-dependent lone elements and carrying out such attacks inside Iran will be much easier profiting from [anti-government] feelings,” the officer said.

For now, the Revolutionary Guards are tightening their grip at home. Human rights activists say they have arrested hundreds of Sunni activists and members of Arab separatist groups that have claimed responsibility for past attacks on oil pipelines.

Yaqoub Al-Tostari, spokesman for one of two groups that call themselves the Arab Struggle Movement for the Liberation of Ahwaz, denies any links to Gulf Arab states.

“I can tell you that carrying and using a gun is a common practice among Ahwazi Arab people,” he told Reuters by WhatsApp.

“After the cruel suppression of the civil movements, if our nation decides to resort to guns, it can deliver blows much bigger than this.”