WASHINGTON — When the rallying cry on the streets of Tehran turned from “Death to America!” to the stranger-sounding “Death to the Dictator!” there was a great temptation to conclude that the days of the mullahs were numbered.

Maybe they are and maybe not; as President Obama said on Tuesday, “we don’t know yet how this thing is going to play out.” But inside Mr. Obama’s National Security Council, and around the world, versions of the same question were being asked: Will the resort to raw repression work? Or will it eventually backfire, only widening the huge political breach that the election laid bare?

The history of repression to save regimes — or at least their leaders — is long. And every case is different: Some regimes are brittle in the face of popular pressure while others are supple in adapting to it; some can use nationalism as their trump card, while for others, it is an Achilles’ heel. And if some regimes are simple tyrannies, the structure of Iran’s political system is especially complex and opaque.

Still, a common thread is clear: It is the security services on which the regime’s fate ultimately hinges. If they decide their best interests lie with the powers that they have protected, and that have protected them, they will stick it out. If they decide they are more likely to prosper under new leadership, power can collapse at the speed of a show trial.

Twenty years ago this month, many inside and outside of China who witnessed Tiananmen Square confidently predicted the beginning of the end for the Communist Party. They were wrong. Two decades later the party itself has changed radically enough — tossing aside its revolutionary ideology and replacing it with a social compact built on stupendous annual economic growth — that it remains secure, with its grip on power as solid as ever.

How has it done that? Over the past two decades, the Chinese Communist Party has allowed some local elections, tolerated some protests over pollution or corruption (as long as they did not cut deeply at the powers of the national leadership), and allowed greater freedom to travel abroad and surf the Internet (with some strict limits). And the educated, rising classes accepted the unwritten rules: You can enjoy your rising expectations, but don’t challenge the party’s authority.

Meanwhile, the military has reaped spoils; not only is it being modernized, but today its financial enterprises are a large part of China’s rising economy.

It is an example that the Iranians have, presumably, watched carefully, if only in this sense: their Revolutionary Guard, too, has grown in standing and financial clout in recent years.

Reach back a bit further in history, though, to the Solidarity uprisings in Poland in the early 1980s, and the lesson is different. There, at first, repression also worked. The security forces, part of the Warsaw Pact, were called on to enforce martial law and remained loyal to a government firmly in the Soviet Union’s orbit. But over a decade’s time the regime’s hold on power — and on the soldiers’ loyalties — eroded as union workers, intellectuals, a pope and eventually even the security forces lost all confidence in a government that they viewed as illegitimate.

Part of the reason the regime proved vulnerable was that Poles themselves saw it as a foreign implant. So when the Soviet Union began to fall apart, the security forces recognized that their own patron was heading for the rocks. They made a strategic (some might say survival) decision to back whatever government the people chose.

Photo

HALT Myanmar, 2007.Credit
Reuters

That was the beginning of a swift end. But the model doesn’t really fit Iran. The mullahs may be many things — fundamentalist, intolerant, even vote fixers — but their trump card is that they are Iranian to core, and that their own revolution 30 years ago ejected an autocrat whose chief supporter abroad was the United States.

The examples do not stop there: Burma’s brutal junta, which rewards a loyal, if corrupt, military even as the general economy withers, has resisted a democracy movement’s protests for three decades; North Korea’s all-powerful military has never let protests fester at all, even as it pursues nuclear weaponry while the population goes hungry. On the other hand, in Indonesia and Nicaragua, the first cracks in dictatorships quickly shattered myths of impregnable control.

Nicaragua’s case, in the 1970s, was a lesson in the price of losing core supporters. The Somoza dynasty had weathered rebellions before, but made a crucial mistake when it squandered foreign aid sent to help the shattered economy rebuild after a 1972 earthquake. That, combined with its brutality, alienated important middle-class leaders, who made common cause with the leftist Sandinistas as the United States slashed military aid. By 1979, the rebels had beaten the army.

Experts say that case may offer little parallel to Iran, whose economy is insulated whenever oil prices rise and whose populist president can appeal to the masses even when the elite grumble about the cost of Western sanctions.

South Korea’s experience was different still, but also limited as a parallel to Iran. Its generals, who had run an authoritarian government during the cold war, were persuaded that they would not lose all their power in a democracy; that became the key to establishing one in the late 1980s.

“It’s too early to draw any conclusions about which model fits in Iran,” said Zbigniew Brzezinski, who was born in Warsaw and had the thankless task, as Jimmy Carter’s national security adviser, of trying to establish relations with the leaders of Iran’s revolution in 1979. “But in this case, I have to say I’m pessimistic in the short term, and optimistic in the long term.”

That pretty well captures the mood of Mr. Obama’s advisers. In background conversations last week, several cautioned that it was not clear what the Iranians had in mind. “The students in Tiananmen wanted real democracy, the Poles wanted regime change, but the Iranians might be looking for something in between,” one of Mr. Obama’s top advisers said. “But the more the supreme leader cracks down, the more radicalized the opposition may become.”

Robert Litwak, the author of “Regime Change,” a study of how modern regimes have fallen, said last week: “The truth here is that a soft landing for Iranian society is not a soft landing for the leadership.” So far, he observed last week, “the Iranians are not as sufficiently united against the regime as the Poles were in the late ’80s.” Moreover, the Polish regime was more fragile: Because it was considered a Soviet tool, the opposition could play to nationalist emotions.

Not so in Iran. The clerics may be repressive hardliners, but they are authentically Iranian. And so far, the Revolutionary Guard seems completely on the side of the supreme leader and President Mahmoud Ahmadinejad.

That will be hard to shake. Mr. Ahmadinejad’s rise to power was in part because of Guard support, and he has since rewarded it handsomely. The Revolutionary Guard runs Iran’s nuclear program; if the opposition gains power, the Guard has to wonder what it might negotiate away. And outside agencies estimate that Iran could become able to assemble a nuclear weapon between 2010 and 2015.

As one of Mr. Obama’s aides said the other day, “for the leadership, that suggests the next five years are no time to be messing with the formula.”