A veiled Iranian woman walked past a satirized drawing of the Statue of Liberty during a state-backed rally marking the anniversary of the takeover of the US Embassy by militant Iranian students in 1979.

Vahid Salemi/AP/File

View Caption

A US Army officer briefs Secretary of State Hillary Rodham Clinton and Defense Secretary Robert Gates (not seen) during a visit to the demilitarized zone in Korea. A North Korean soldier peers in the window.

Paul J. Richards/AP/File

View Caption

A Hezbollah supporter in Lebanon holds up a poster of Iran’s supreme leader, Ayatollah Ali Khamenei, during a rally. Iran is a chief supporter of the militant Hezbollah group.

Hussein Malla /AP

View Caption

Kim Jong-un (c.), the youngest son of North Korean leader Kim Jong-il and his designated successor, claps after inspecting a power station in Chagan Province. Educated in Switzerland, he is one of the world’s least-known political figures.

But in the April 2009 US diplomatic cable from Seoul to Washington, the comparison of the backward and unpredictable regime in Pyongyang to a child acting up in an attempt to get attention was remarkable because of who had made it: He Yafei, the Chinese vice foreign minister.

A year later, another cable depicting a conversation between the South Korean vice foreign minister and senior Chinese officials would suggest that Beijing was tiring of its role as a lifeline to a withering Pyongyang, and was warming to the idea of a reunited Korea under the South's control.

The cables – a small piece of the mammoth cache of diplomatic communications released last month by the truth-out organization WikiLeaks – represented from Washington's perspective a bit of promising news in one of the world's most intractable and dangerous confrontations. Or at least they were until North Korea decided in November to rain down artillery fire onto the South Korean island of Yeonpyeong, putting North Asia once again at the brink of something that could potentially degenerate into nuclear war.

But what the cables also suggested, in the way they presented China as a glimmer of hope in the North Korea crisis, was the dearth of good options the United States has to choose from as it seeks to address the challenges posed by an aggressive and misbehaving state that happens to possess nuclear weapons. The same intractability characterizes another relationship the US faces in an even more unstable part of the world – the three decades of antagonism with Iran.

In a world of more than 190 nations, many of them problematic, North Korea and Iran remain in a class of their own for the US – charter members of the "rogue states" club, a list that has dwindled over the past decade with the subtraction of Saddam Hussein's Iraq and a defanged Libya.

The particulars of the North Korean and Iranian challenges make them different in significant ways. But in an era when non-state actors like Al Qaeda have emerged as top international security threats, North Korea and Iran remain the two starkest outliers in the global community of states because of several factors they share in common – factors that make them particularly difficult to address.

Both North Korea and Iran remain in long and hardened conflicts with the US, the world's sole superpower. Both are sustained economically in a manner that staves off collapse – North Korea by its patron state, China; Iran by its oil wealth. Both have an identity that makes reconciliation with outside adversaries more difficult. North Korea appears motivated by a desire to safeguard a regime of privileged elites, while Iran sees itself as a global rebel with a cause: the leader of a broad Islamic revolution and defiant promoter of a new global order no longer dominated by traditional powers.

Most significant, the two have nuclear programs that risk destabilizing their regions and threaten an already fragile global nonproliferation regime.

"Both are countries that tend to have foreign policies or exhibit international behavior that is a source of concern and friction with the international community, and both are pursuing nuclear weapons and policies that bring them into conflict with the US and America's allies," says James Dobbins, a former US diplomat who is now director of the International Security and Defense Policy Center at the RAND Corp. in Arlington, Va. "There are a number of countries out there with one or the other of these factors, and they are less of a concern. It's the combination of the two that really makes North Korea and Iran stand out."

It is these characteristics that make North Korea and Iran "rogue states," a term Mr. Dobbins says is fair because it "aptly depicts an unwillingness to comply with broadly accepted standards of international behavior and respect for human rights."

But others say such labeling is an oversimplification of two very different challenges that could make solving them more difficult. "It creates barriers to understanding rather than facilitating understanding and therefore a way forward," says Andrew Bacevich, an international-relations expert at Boston University.

To begin with, Mr. Bacevich joins other analysts who focus on what they consider the overriding difference between the two countries. Iran, despite the fiery rhetoric of its mercurial president, Mahmoud Ahmadinejad, is seen as rational and even cautious, whereas North Korea is seen as utterly unpredictable. This makes Pyongyang more dangerous, at least in the short term.

Iran certainly has internal political challenges – its economy is flagging, in part under pressure of tightened international sanctions, and the Revolutionary Guard force is playing a growing role in both economic and political affairs. It is also making substantial progress on missile development, along with its nuclear program. But it doesn't represent the imminent security threat of North Korea, say many analysts.

"It's a different kind of challenge," says Bruce Jentleson, a State Department consultant and professor of public policy and political science at Duke University in Durham, N.C. "With North Korea, it's day by day. You don't know what surprise they might present, and the concern is about a rapid escalation of military action back and forth.

"With Iran it's a different kind of time frame," he adds. "There's not as much concern that Iran will take aggressive action against us, or Israel, or anyone else in the short term."

Iran's "rational" behavior is one reason some analysts find it easier to understand the actions Tehran takes. "If I put myself in the shoes of the Iranians, it's not so difficult to take their version of things," says Bacevich. Facing the security threat posed by the US, which after all still has 50,000 troops next door in Iraq, "they have made a rational calculation to ramp up effective defenses," he says.

If the Iranians are master chess players, as they're sometimes described – the epitome of rationality – the North Koreans are something else.

The roots of North Korea's worldview

To understand Pyongyang today, it may help to step back from a world of nuclear weapons and antiballistic missiles into one of feudal kings.

North Korea, in both its mode of governance and its view of the world, perpetuates the cruelty as well as the isolationism of the Chosun Dynasty kings who ruled the Korean Peninsula for 500 years until the Japanese arrived in force in the early 1900s. The North Korean regime, with its dictatorial hold over 24 million people, carries on the forms of that era in a rigid class system, harsh penalties for any sign of disrespect for the ruler – and the dynastic succession that began with "Great Leader" Kim Il-sung.

The system has delivered a North Korea that operates as an international crime syndicate, with a class of privileged elites headed by a mafia that trades in contraband ranging from narcotics to missiles to components of nuclear devices. In the meantime, the bulk of the population endures a dilapidated economic system in which industry has failed, most people don't have electricity, public health is miserable, food is scarce, and public executions are common.

Given those internal conditions, it might seem all the more perplexing that the regime continues to stage provocative incidents beyond its borders.

Brian Myers, a professor and author of "The Cleanest Race: How North Koreans See Themselves and Why It Matters," synthesizes the strands of influences informing the lives of the North Korean elite as "a paranoid, race-based nationalism with roots in Japanese fascism." Given the mind-set, he says, "North Korea as a military state has to flex its muscles on a regular basis."

In an interview following the North's Nov. 23 artillery barrage on tiny Yeonpyeong Island, Mr. Myers said that North Korea "thrives on tensions." Look at "the very fact that they play into the crazy rhetoric," he says. "These things will keep going."

Rather than a communist country, Myers describes North Korea as a "far right state with a command economy. They justify their existence. They are feeling naturally pretty sure of themselves when they sink a Korean ship" – an allusion to the torpedo attack that sank the South Korean warship Cheonan on March 26, killing 46 sailors.

Yet for all its bravado, North Korea remains dependent on China – a link once again rooted in the Chosun era. Korean kings, from behind their palace walls in Seoul, emerged every year on pilgrimages to Beijing, paying homage to the emperor. They would sometimes remain there for weeks, engaging in commercial deals and social activities that cemented a relationship in which Korea was not exactly a dependency but a protectorate.

Though its frustration with Pyongyang's acting up may be rising, China still seems committed to the survival of the North Korean regime as a buffer: between China and its historic foe Japan and latter-day foe, the US. For China, North Korea is also a potential source of mineral wealth, as well as many forms of cross-border trade, some of it legal, much of it on the black market.

Yet China is limited in how much it can rein in Pyongyang's aggressive behavior. One reason is simply that the North Koreans are not easy to deal with. They reflect a national pride that compels them to spurn Chinese demands. The state philosophy of juche, self-reliance, was formulated by Kim Il-sung in the years after the Korean War in reaction to his, and North Korea's, humiliating dependence on China for survival.

Beijing may not like North Korea to have weapons of mass destruction, but neither does it want the country to reduce its strength significantly. As long as North Korea maintains a formidable military establishment, the Chinese can be sure that no potential enemy will try to overrun North Korea.

North Korea's military establishment is a front line of defense for the Chinese. And as long as they maintain that outlook, Chinese leaders will see no point in blaming North Korea for the sinking of a warship, or in publicly chastising the North for an artillery barrage on hapless civilians.

The roots of Iran's worldview

Iran's psychology of defiance toward the US also runs deep, going back to the 1979 Islamic revolution, and to the US-Iran hostility that has continued every day since. Among the most common slogans chanted on the streets during the toppling of the pro-West shah was "Independence, Freedom, Islamic Republic."

In the minds of Iran's revolutionaries, that "independence" meant casting off the imperial influence of Russia, Britain, and finally the US, all of which had at various times over two centuries defined Persia as their playground. The newborn Islamic Republic declared a policy of "Neither East nor West." Unique to Iran, photographs from the cold-war era show Iranians defiling American, Israeli, and Soviet flags.

"You see the footprint of ideology in everything that the Iranian government does," says Muhammad Sahimi, a professor at the University of Southern California and a political analyst for the Tehran Bureau website. "They are very self-righteous ... they think they are the model of revolutionary purity and piety."

From the day the Islamic Republic was born, fighting "enemies" in the West has been a pillar of evolutionary belief. Taking on more powerful foes than oneself in the name of God – to follow in the footsteps of the 7th-century "Lord of the Martyrs" Imam Hossein – fits the Shiite Muslim worldview of constant struggle.

Into that mix, two historical events have defined, and still shape, US-Iran enmity. Tehran despises Washington for toppling a popular prime minister in 1953, in the first-ever CIA coup, and for restoring the shah, whose US and Israeli-trained SAVAK intelligence agents ruthlessly enforced control. That event – and the abuses that followed – are kept alive in a prison-turned-museum in Tehran, where wax figure torturers are depicted as American businessmen, in white shirts with rolled-up sleeves, ties, and suspenders. Hundreds of pictures of former inmates line the walls, among them that of the supreme leader Ayatollah Ali Khamenei, whom the shah imprisoned six times.

On the other side, America resents Iran for taking 52 diplomats hostage for 444 days starting in 1979. When the highest-ranking envoy in captivity, Bruce Laingen, shouted to one hostage-taker that the action was a "violation of every law of God and man," he was told: "You have no right to complain, because you took our whole country hostage in 1953."

Ironically, Iran has one of the most pro-American populations in the Middle East. But any Iranian can also list events that reinforced the regime's belief that America was a "Great Satan" determined to overthrow it. They range from US support for Saddam Hussein during the Iran-Iraq War – the American satellite intelligence given to the Iraqis, for example, made chemical weapons attacks against Iranian troops more deadly – to the US Navy's downing of a commercial Iranian jetliner in 1988 to imposing more and more sanctions.

Echoing Boston University's Bacevich, USC's Mr. Sahimi says, "If you put yourself in their shoes and take a look around ... there is at least some credibility to their concerns about Iranian national security and territorial integrity." Making peace with a country that has chanted "Death to America!" for a generation is not easy, he adds, but "we need to look in the mirror at ourselves, and see what we have done that makes these people so angry."

Yet neither side has left behind the rhetoric of conflict. Archconservative President Ahmadinejad has crowed about the "demon" power of America in decline. Mr. Khamenei has said differences with the US are a matter of "life and death."

On the American side, George W. Bush in 2002 famously included Iran (along with North Korea and Iraq) as part of an "axis of evil." And in 2008, the then-chief of US Central Command, Adm. William Fallon, said: "These guys are ants. When the time comes, you crush them."

Add to this mix the view among Iran's hard-line leadership that their country and its Islamic regime are a sacred state with divine backing.

Iran's nuclear program has come to play a central role in this ideological battle. US-led opposition to key aspects of Iran's nuclear program, including uranium enrichment, has turned the fight – in the eyes of the regime – into another example of Western powers trying to deprive it of scientific knowledge and clean nuclear energy.

Yet despite the claims of victory in its battle with the West, Iran finds itself strategically enveloped on three sides: by US forces deployed in Iraq, Afghanistan, and the Persian Gulf. It is isolated by a host of sanctions, including four sets imposed by the United Nations Security Council, that are hurting its economy. And leaked US diplomatic cables show that some Arab neighbors, fearing Iran's nuclear plans and regional ambitions, argue for a military strike.

Adm. Mike Mullen, chairman of the US Joint Chiefs of Staff, told CNN on Nov. 28 that the Pentagon had "actually been thinking about military options for a significant period of time." As for Iran's claim that it is not interested in developing nuclear weapons, the admiral said he did not "believe it for a second."

What can be done

Despite rising tensions, few experts put military action at the top of the list of solutions in either case. While many believe that a US-backed South Korea could terminate the North Korean regime, it would very likely be at the cost of a Seoul in ruins.

"We're not talking about a war in the Iraqi desert if things did escalate" between the Koreas, says Duke's Mr. Jentleson. "With Seoul so close to the [demilitarized zone], it's really unthinkable."

As for Iran, many analysts believe that military strikes to stop Tehran's nuclear program would have only a negative impact: prompting Iran to expel UN inspectors and move swiftly and secretly toward a nuclear bomb as its only chance of deterrence. It would also infuriate much of the Muslim world.

A place to start is understanding what the other side wants – perhaps more easily done in the case of a "rational" Iran than an unpredictable North Korea. "Iranian leaders want two things," says Sahimi. "First, they want to be sure that Iran will not be attacked, so that their Islamic system will survive – or at least not be toppled by a foreign country. Second, they want the US to recognize Iran, not as another client state [but] as a major power in that part of the world, that has to be given due respect."

From Sahimi's perspective, stopping Iran short of developing a bomb will mean providing security guarantees, specifically from the US, and accepting that Iran will continue to enrich uranium. The "best way" to control the program is through more stringent safeguards, he says, and by changing the political dynamic.

Others say that, as difficult as it may sound, the best course for the future may be a kind of cold war where the international community increases pressures but avoids a new conflict. Containment, deterrence, and – in the case of Iran – increasingly freezing it out of the global trade system it needs.

If there's any solace to take in all this geopolitical antagonism, it's that the West has safely navigated some very real threats in the past. "Other countries have been far more dangerous than Iran and far more irrational than North Korea," says RAND's Dobbins, ticking off "Stalin's USSR and Mao's China." Both were significant and nuclear-armed adversaries with more irrational leaders than those in Iran or possibly even in North Korea, he says.

Jentleson agrees, saying anyone who can recall "a very scary Red China" should consider how the US and China "began finding shared interests in the '70s ... to a point where they are no longer adversaries today."

But he cites another option beyond simply waiting out or isolating an adversary: the Libya model. "We should remember that Libya was the original rogue state, with an unpredictable and mercurial leader who was posing security risks and challenging the international order in some very violent and destabilizing ways," Jentleson says. In 2003, Libyan leader Muammar Qaddafi agreed to a plan to end his country's WMD program and pave the way to exchanging pariah status for international recognition.

"It was really tough and patient diplomacy that got it done," Jentleson says, "and there's no reason to think that it's impossible for either Iran or North Korea to strike a deal."