Iranians are as obsessed as Americans these days with the black-clad gangs roaming Iraq and Syria and killing Shiites and other “infidels” in the name of Sunni Islam. At the supermarket, in a shared taxi or at a family gathering, conversations often turn to the mysterious group, the Islamic State in Iraq and Syria, and how it came to be. And for most Iranians, the answer is obvious: the United States. “Come on, you know who has created ISIS,” said the supermarket owner, winking his right eye. “Admit it,” demanded the taxi driver, hitting his steering wheel to make his point. “It is so obvious!” concluded the talkative uncle at the birthday party. ISIS, Iranian leaders have been saying for a long time, is made-in-the-U.S.A., a tool of terror intended by the world’s superpower to divide and conquer the energy-rich Middle East and to counter the growing influence of Iran in the region. Iran’s supreme leader, Ayatollah Ali Khamenei, has often said that he believes ISIS was created by the United States as a way to regain a foothold in Iraq and to fight President Bashar al-Assad of Syria, an ally of Iran. “We have evidence, we know,” he told an audience of clerics last week, without elaborating. Ayatollah Khamenei reminded them that Al Qaeda — a creation of theCentral Intelligence Agency, Iran has said — and the Taliban were, in the eyes of Iranian intelligence, devised by the West as a counterweight to Iran. “There is no doubt that these movements are created by Western powers and their regional agents,” Mr. Khamenei has insisted. His words, echoed by many others in Iran, have been resonating on state television, which is the main tool for disseminating propaganda and is watched all over the country. On Wednesday it showed what it said were images of Senator John McCain, the hawkish Arizona Republican, at a meeting with the current caliph of ISIS, Abu Bakr al-Baghdadi. “These say more than a thousand words regarding the links between the United States and this group,” an announcer added. Iranians are often the first to dispute rash ideological statements by their leaders, usually creating flurries of text messaged jokes in response. And some skeptical voices could be heard. “It is essentially a terrorist group of the extremist Muslim sects of the region against the other sects,” Mehdi Mirzaei, 27, a student of English literature, said of ISIS. “I am pretty sure that America is not supporting ISIS. That is all nonsense.” But the claim that ISIS is a creation of the Obama administration has gained wide traction here. From the Iranian viewpoint, shaped by their spotty exposure to Western culture, analysts say, creating a terrorist organization opposed to Iranian interests is the obvious thing for a superpower to do. “These ISIS fighters, they remind me of American cowboy movies,” said Mostafa Faramazian, an employee of the Oil Ministry. He had seen clips of the Sunni fighters driving along the desert plains of Iraq and Syria, like outlaws in the wild West. “They are performing the American dream in a faraway land,” Mr. Faramazian said. “Their goal is to make us weak, like they did with the Indians.” Iran also has a long history of victimhood, whether to Mongol invaders or Western intelligence agencies and oil companies. Iranians, with their language and faith, often feel lonely and isolated in the world arena. “Where most other states in the region were formed by colonial powers, Iran is an ancient empire,” said Housang Tale, a historian and self-described nationalist. The West, he said, and especially the United States as a superpower, is well aware of Iran’s great potential and therefore has committed itself to stopping the country from progressing in any way. “Without groups like ISIS we can revive our empire,” Mr. Tale predicted, “and become the biggest power in the region.” Victimization plays an important role in the Islamic republic’s official ideology. When the shah was ousted in 1979, the same revolutionaries who ended his rule said his downfall illustrated the plots committed by the United States, dropping the king after he had lost his usefulness. Iranian textbooks now say that when Iranian students took over the United States Embassy in 1979, taking diplomats and other personnel hostage for 444 days, they did so to forestall a coup d'état like the one organized by the C.I.A. in 1953, which led to the toppling of a democratically elected prime minister, Mohammad Mossadegh. The list of perceived wrongdoings is so long that every major current event involving the United States is explained by the state’s ideologists as a plot to undermine Iranian interests. Ayatollah Khamenei labeled the attacks on Sept. 11, 2001, a “suspicious event.” Former President Mahmoud Ahmadinejad called them a “plot.” The invasions of Iraq and Afghanistan that came after were clearly meant to create a ring of military bases around the country, officials have often said. The sanctions imposed over the Islamic republic’s nuclear program are “shackles.” “Our country and our revolution are oppressed, but we are powerful,” Ayatollah Khamenei said on Thursday. On the streets, where many are openly critical of the clerical government —its economic mismanagement, widespread corruption and a lack of freedoms — threats to the nation still hit a very raw nerve, even among the educated classes. “America supports any group that breaks a ring of this Iran-Syria-Lebanon-Palestine chain,” said Amir Hosein Mohammadi, a radiologist. He was referring to what Iran’s leaders call the “axis of resistance,” the focal point of opposition to United States interests in the region. Iran’s support for Syria’s president, Mr. Assad, never gained much traction among ordinary people here, who care more about the economy than about propping up the leader of a distant land. But why would the United States now declare ISIS a threat to its national security and say it is ready to bomb the group inside Syria, thereby bolstering Mr. Assad by attacking his most formidable opponent? “The United States created a monster, even beyond their own control,” said Mr. Mohammadi. “If they don’t stop ISIS now, nobody can predict what will happen in the future.”