In front of portraits of the late Iranian revolutionary founder Ayatollah Khomeini, left, and supreme leader Ayatollah Ali Khamenei, President Mahmoud Ahmadinejad, sings Iranian national anthemin June. (Vahid Salemi/AP)

As Iranians struggled Wednesday to comprehend an alleged plot to assassinate the Saudi ambassador to Washington, analysts here agreed that even if U.S. charges of official Iranian involvement were true, President Mahmoud Ahmadinejad and his government likely had nothing to do with the scheme.

The security organizations that the United States says were behind the alleged plot — the Revolutionary Guard Corps and its elite special operations branch, the Quds Force — are well beyond Ahmadinejad’s influence. And leaders associated with them have played key roles in attacking Ahmadinejad during his recent rift with powerful Shiite Muslim clerics and commanders who helped bring him to power.

Amid new levels of infighting within Iran’s opaque leadership, Ahmadinejad at present wields no influence over the country’s two main intelligence and security organizations: the Ministry of Intelligence and the Revolutionary Guard Corps. They are firmly under the control of Iran’s supreme leader, Ayatollah Ali Khamenei.

Even against the backdrop of this power struggle, Iranian dissidents and analysts are hard-pressed to come up with reasons for any of Iran’s leaders to undertake such a risky plot. Even if carried out successfully, it probably would have been quickly blamed on Iran, the analysts noted.

The U.S. Justice Department on Tuesday accused “elements of the Iranian government” of conspiring to kill the Saudi ambassador. In addition to an Iranian American who was arrested in New York, officials named two alleged Iranian conspirators as Quds Force officials: Gholam Shakuri and Abdul Reza Shahlai. Shakuri, who was identified as a deputy to Shahlai, was charged in the case. Both remain at large. U.S. officials declined to say how high in the Iranian leadership they think the conspiracy goes.

Iranians interviewed Wednesday suggested various possible culprits in the alleged plot, ranging from the CIA to Revolutionary Guard elements to a rogue faction within Iran’s power structure.

“There are those within the Guards with some degree of independence,” said Sadegh Zibakalam, a political scientist critical of the government. “But I cannot point any fingers in this bizarre plot that only hurts Iran.”

What is clear, analysts said, is that the Islamic Republic’s security organizations are currently a black hole for the Ahmadinejad government, which is increasingly under fire from Intelligence Ministry officials as well as Revolutionary Guard commanders and hard-line Shiite clerics.

These critics recently called Ahmadinejad’s chief of staff and main adviser, Esfandiar Rahim Mashaei, a “tumor” that needs to be cut out of the government. They have also threatened to launch impeachment proceedings against Ahmadinejad if he refuses to cut ties with advisers they describe as a “deviant current” bent on undermining the influence of the country’s ruling clerics.

Ahmadinejad publicly fell from grace in April when he tried to fire Intelligence Minister Heidar Moslehi, a Shiite cleric, but was forced to back down when Khamenei, the supreme leader, reinstated him.

Replacing Moslehi with someone from Ahmadinejad’s inner circle would have strengthened the president’s hand in the ministry. Now Ahmadinejad is facing public attacks from his former hard-line backers, who accuse him, among other things, of planning to restore relations with the United States.

Some analysts speculate that the bizarre alleged plot to kill the Saudi ambassador was engineered by the Revolutionary Guards — but was meant to be discovered by U.S. intelligence — in order to sabotage any possible back-channel talks between Ahmadinejad’s representatives and the United States.

Others dismiss that theory, saying that the Iranian hierarchy’s control of foreign policy is clear. Khamenei makes the important foreign policy decisions, and extensive surveillance by political commissars leaves little room for rogue elements.

With Iran’s regional role in flux, some Iranians wonder whether the alleged plot could be related to developments closer to home.

Iranian officials admit privately to genuine worries over losing Syria as a strategic partner and say popular uprisings in the Middle East pose challenges, as well as opportunities. The ouster of entrenched rulers in the region is seen as reducing Iran’s role as a leader of oppressed movements.

“In the current status quo, Iran might lose, with now even Hamas trading prisoners with the Israelis,” one analyst said, referring to the Palestinian militant group. “Maybe they felt the need to make a great impact on their enemies.”

Others strongly disagreed, arguing that none of Iran’s security organizations would stake so much now on such an ill-conceived plot. “Iran’s leadership would never risk being involved in hitting someone on U.S. soil,” Zibakalam said. “Why would they endanger Iran in this way? This is really not logical.”

Yet, there is some precedent for such an act. In 1980, an American Muslim acting on behalf of the new revolutionary government in Tehran assassinated Ali Akbar Tabatabai, a monarchist living in exile in the Washington area, before fleeing to Iran.

As Iranians puzzle over the latest alleged plot, a realization appears to be setting in that, true or not, the allegations herald a dangerous period of increased tensions between Iran and the United States.

“Whoever is behind it — inside or outside the country — is determined to create an international front against Iran,” said Saeed Laylaz, a political analyst who was imprisoned in a crackdown on anti-government protests following Ahmadinejad’s disputed 2009 reelection. “The U.S. is gradually paving the way for a confrontation with Iran,” he said.