North Korea's state television channel aired footage of the state's Moranbong Band performing in celebration of the scientists who successfully launched a long-range rocket on February 7. The rocket launch has drawn international condemnation. (Reuters)

On Jan. 7, North Korea’s state media shocked the international community by announcing the “spectacular success” of a hydrogen bomb test. Many international observers in South Korea and the West have questioned whether North Korea’s nuclear test was actually a hydrogen bomb like Kim Jong Un alleged or merely a fission bomb similar to what it had tested previously. Then, on Feb. 7, North Korea launched a long-range missile that put a satellite into orbit, seen as a demonstration that the country had ballistic missiles that can aim those weapons at the West.

North Korea has clearly tested another nuclear device, bringing scathing criticism — not just from Western countries, but more alarmingly for Pyongyang, from its traditional allies, Russia and China.

Why would North Korea risk steepened international sanctions at a time when its economy has been ravaged by the worst drought in a century?

Here’s why: To strengthen Kim Jong Un’s totalitarian grip on power, at a time when the regime has been losing its ability to reward loyal elites with revenues derived from North Korea’s shadow private economy and has resorted to violent purges to punish discord within the military’s ranks.

That makes sense when you consider these five factors.

1. Kim Jong Un has an uneasy hold on power.

Kim’s father, Kim Jong-Il, took power relatively easily in 1994. That’s because he had been heir-apparent as early as 1980, gradually gaining authority over the North Korean military. But Kim’s takeover in December 2011 was relatively sudden, because he was designated as successor only one year before his father’s death. As a result, the new Dear Leader had very little time to establish his credibility among the ruling elites before taking power.

Anonymous accounts from Pyongyang elites recently revealed that many believed Kim has an irresponsible and aggressive personality, born out of a lifetime of privilege, and shouldn’t be leader.

Rival factions within the North Korean military-industrial complex are battling over whether Kim’s military investments and China policy are the right strategies. Some are challenging Kim’s authority so severely that the regime has begun violent purges, publicly executing dissenters. But that’s a short-term Band-Aid, not a long-term strategy.

2. For three decades, North Korea’s nuclear weapons program has helped rally its citizens around the flag — or rather, around Dear Leader.

Using nuclear weapons to rally the country has a history. In 1962, the Democratic People’s Republic of Korea (DPRK) committed itself to “all-fortressization,” hyper-militarization and nuclear weapons development that would enable the country to defend itself from any U.S. and South Korean aggression without help from the Soviets or Chinese. Since Kim Il Sung launched North Korea’s nuclear program in the 1980s, North Korean elites have believed that a usable nuclear arsenal boosts the nation’s international status.

That’s true not because it demonstrates military might. Nuclear tests bring international media attention, which boosts North Korean pride. Scott Snyder and Kyung Ae-Park argue in their 2013 book, “North Korea in Transition: Politics, Economy and Society,” that North Korean aggression brings the Democratic People’s Republic of Korea (DPRK) welcome geopolitical recognition.

After launching a long-range rocket on Feb. 7, North Koreans celebrate with a parade in Pyongyang and fireworks that light up the sky. (Reuters)

When the United States sends former presidents to engage in diplomatic negotiations with the DPRK regime, that’s a massive PR victory — and boosts Kim’s status and power. State-level diplomatic recognition also contributes greatly to the legitimization of North Korea. Leaders like Russian Foreign Minister Sergei Lavrov argue for a North Korean seat at the bargaining table on nuclear security issues, which strengthens Kim, reassuring elites that the nation is not entirely isolated internationally.

Successfully testing a hydrogen bomb strengthens Kim’s claim to know what he’s doing as he invests the nation’s scarce resources in developing nuclear technology. It proves that he can lead. What’s more, it gives Kim heightened stature as a patriotic hero — since neither his father nor his grandfather was able to build and test a hydrogen bomb.

3. Nationalism and anti-Americanism also shore up the regime’s power.

No one believed North Korea’s official announcement that, with the newly tested hydrogen bomb, the DPRK could now wipe out the United States. And yet the announcement reinforced Kim’s deeper message: The United States remains a hostile power encircling North Korea, and nuclear weapons are essential to combat that threat.

Nothing brings a group together like a big bad enemy, and that’s exactly what anti-Americanism does: Consolidate elite and popular backing for the regime. That’s why the regime has for decades fed the public educational propaganda and state-run “news” media reports to remind citizens of the 30,000 U.S. troops in South Korea, “proof” that America is an ever-threatening enemy.

That anti-Americanism runs deep, at all levels of society. It’s part of why even the more independent-thinking elites accept Kim’s refusal to pursue an Iran-style nuclear deal with the West — even if that might end sanctions, relieve starvation and poverty, and bring more international aid. Kim reminds them that after Libyan dictator Moammar Gaddafi’s decision renounced weapons of mass destruction, the West backed the colonel’s overthrow — and the nation has been in chaos since.

4. Thumbing its nose at China proves independence and has very few risks

North Korea may depend on China to keep from starving — and yet it has recently been extremely belligerent toward its patron, as if Kim is proving that money can’t buy obedience. The DPRK’s recent acts of defiance include hacking Sony, the January hydrogen bomb test, and the February rocket launch.

Lee Jung Hoon, a noted professor of international relations at Seoul’s Yonsei University, contends that China views Kim as an irresponsible leader. Kim has never met Chinese President Xi Jinping. North Korea wants to make clear that it’s an independent ally, not its patron’s proxy or puppet.

But China is stuck. It doesn’t want a North Korean state collapse, putting almost 25 million starving refugees at its border. That’s why it keeps pledging and delivering assistance. And North Korea exploits that quite effectively, realizing that China has no choice but to support it no matter what. In other words, the China-North Korea partnership is a marriage of convenience, not a genuine alliance.

5. Kim Jong Un wants to show off his strength before the May Workers Party Congress

But why would North Korea launch a nuclear test and satellite now?

Many regional observers believe it’s because in May, Pyongyang will hold a historic Workers Party Congress, the first gathering of ruling party members since 1980. Michael Madden argues that Kim called a Workers Party Congress because he wants to formalize authority and power structures. Even though Kim retains totalitarian control over the North Korean state, challenges from dissident factions have caused him to reinforce his legitimacy through established political institutions.

Lee Cheol-woo, a member of South Korea’s parliamentary intelligence committee, recently argued that North Korea’s hydrogen bomb test was aimed at showcasing a good result that Kim could celebrate at the Congress, rallying the elites so that they will back him as he consolidates power.

So what?

Here’s what all this means. Unfortunately, North Korea’s recent hydrogen bomb and missile tests are not irrational actions by a rogue dictatorship. Rather, they are strategic moves aimed at consolidating Kim’s leadership position domestically. Belligerence fuels pro-regime nationalism, boosting Kim’s status so that he can tighten his grip on power. That’s why he’s willing to antagonize long-time allies and suffer through still more international sanctions.

All of which means that North Korean aggression will continue to be one of the most intractable security problems in the Asia-Pacific region.

Samuel Ramani is a master of philosophy student in Russian and East European studies at St. Antony’s College, University of Oxford, specializing in post-1991 Russian foreign policy.