North Korea: There is probably no other country on Earth that draws such obsessive fascination from Americans yet is so widely misunderstood.

You can see it in the (many) portrayals of North Korea in American popular culture. The country and its leader, Kim Jong Un, are almost always presented either as comically ridiculous cartoon villains or as certifiably insane. But neither really makes sense: Cartoon villains and crazy people don't hold on to power for decades while ruling over a broken economy, a miserable population, and a weak military surrounded by enemies.

The North Korean system and leadership, as popularly portrayed, would seem to be impossible and doomed. But clearly it's survived for some time. So what's going on?

This seeming contradiction gets to the number one misunderstanding about North Korea, which is also the single most important fact for understanding this country and why it is the way it is.

That fact is this: While we typically talk about North Korea as a holdover of Soviet-style hard-line communism, and sometimes we indulge North Korea's own propaganda that claims it follows a bizarre and unique ideology known as "juche," neither of those is really correct. In fact, the country is best understood as a holdover of 1930s-style Japanese fascism, left over from Japan's early colonization of the peninsula.

North Korea as we know it begins with World War II–era Japanese fascism

When you look at North Korea understanding this fact, it becomes clear that it survives not despite, but rather because of, the things that make it so unusual: the propaganda, the quasi-religious worship of the Kim family, and the provocative militarism that includes, this week, its fourth nuclear weapons test.

Here's a brief video explaining this history and showing some of the ways it manifests:

The basic history is this: In 1910, Japan colonized Korea, treating Koreans not so much as foreigners but as a wayward subset of the Japanese race now reunited. Imperial Japan's official worldview was race-based, far-right ultranationalism, obsessed with racial purity and superiority. It was a lot like Europe's early-1900s fascist governments, although with a uniquely Japanese element: the quasi-religious worship of the emperor as not just the leader and embodiment of the nation but a semi-divine figure.

Koreans under Japanese rule, and especially Korean writers and officials, were recruited into this fascist worldview, which for a generation many Koreans took on and enforced as their own. Then in 1945, the Japanese Empire collapsed, and the Korean Peninsula was divided between the Soviet-occupied north and the US-occupied south. In the north, the Soviets tried to set up a friendly communist puppet government, as it was also doing in Eastern Europe. But it had a problem: There wasn't really a leftist intelligentsia or officialdom to draw upon. So the Soviets ended up recycling in many of the Koreans who'd been a part of the Japanese fascist project in Korea.

"Almost all intellectuals who moved to Pyongyang after liberation had collaborated with the Japanese so some degree," the historian B.R. Myers writes in his book The Cleanest Race: How North Koreans See Themselves and Why It Matters. When the Soviets set up the North Korean propaganda regime in 1946 to write the new mythology of the Korean state, Myers writes, "most of the top posts went to well-known veterans of the wartime cultural apparatus."

The Soviets didn't just fail in establishing a far-left communist puppet state: They ended up entrenching the very same far-right Japanese fascism the world had just defeated.

"Having been ushered by the Japanese into the world's purest race, the Koreans in 1945 simply kicked the Japanese out of it," Myers writes. "Much of the Japanese [fascist-era] version of Korean history — from its blanket condemnation of Chinese influence to its canards about murderous Yankee missionaries — was carried over whole."

North Korea makes a lot more sense when you see it for what it is

When you start to look for the parallels between WWII-era Japan and modern-day North Korea, you see them everywhere, and the question of why North Korea is the way it is begins to look a lot less mysterious.

The Korean people are portrayed as almost childlike in their purity and innocence, surrounded by impure and hostile inferior races — though whereas this led imperial Japan to subjugate the inferior races, it leads North Korea to isolate itself from their impurity. Hence the hostility to the outside world, particularly America, and the degree to which many North Koreans willingly accept their isolation.

The great leader, Kim Jong Un, is held up as the quasi-divine embodiment of the Korean race and their protector, much as Emperor Hirohito was worshipped in Japan. But Kim, like Hirohito, is also portrayed as innately good, perhaps even too good for this harsh world, hence his often silly and childlike public appearances. But this is also core to North Korea's militarism. Here's Myers:

The masses are reminded with increasing frequency that because the nation cannot survive without the leader who constitutes both its heart and its head, they must be ready to die to defend him. As if the logic were not in itself reminiscent of fascist Japan, the regime makes increasingly bold use of the very same terms — such as "resolve to die" (kyolsa) and "human bombs" (yukt'an) — that were so common in imperial Japanese and colonial Korean propaganda during the Pacific war.

This was no accident. Even one of North Korea's most important national symbols — Mount Paektu, portrayed as the sacred birthplace of the Korean race — was just a willful and self-conscious Korean invention meant to copy Japan's same myth of its own Mount Fuji.

When you look at North Korea this way, it doesn't look so ridiculous and bizarre and inexplicable. Rather, it looks quite familiar, and deadly serious.

That doesn't explain everything, but it explains a lot: the obsession with racial purity, the near-religious worship of the superhuman father-leader, the militarism and hostility and feverish ultranationalism, and the expectation that citizens will happily abandon their individualism for the betterment of the race-based national collective.

As for what this has to do with North Korea's nuclear test (which may or may not have actually been a hydrogen bomb), this gets to North Korea's official narrative of being beset by enemies: The impure races can only ever be doting subjects or hostile threats, and Americans are the evil and impure contrast to Koreans' purity and goodness. It also comes from the militarism and ultranationalism that, as in imperial Japan, rally the subjects behind the regime.

How North Korea updated itself for the modern world

North Korea's militarism and threats, as we know them today and see in this week's nuclear test, have also evolved quite recently, just in the 1990s, in a way that explains particularly this week's nuclear test. And this was a response to the greatest catastrophe ever to befall North Korea: the collapse of the Soviet Union.

For many decades, the Soviets propped up North Korea with large subsidies, seeing it as not a particularly reliable ally but at least a Cold War bulwark against US-allied South Korea and Japan. When the Soviet Union collapsed, the subsidies went away, and in the 1990s, North Korea sank into an economic catastrophe so terrible that as much as one-tenth of the population starved to death.

During this 1990s crisis, it looked to much of the world like North Korea was about to collapse. Its official state ideology told North Koreans they lived in the freest and most prosperous society on Earth, and it placed North Koreans under a near-total information cordon to make this lie seem more believable.

The famine undermined that lie in two ways. First, no amount of propaganda could convince North Koreans who were living off tree bark and grass that their society was prosperous. And second, North Korea had no choice but to ease its border with China, allowing food to enter through the black market, even though this meant a number of North Koreans would glimpse the outside world, either by visiting neighboring northeastern China or through the foreign books and videos that were inevitably smuggled in.

The Soviet Union's collapse presented North Korea with another existential problem: It no longer had a superpower patron to protect it. Sure, China had an interest in keeping the Korean peninsula divided, but by the 1990s it had no love for North Korea, and would only do so much to protect it from a Western-dominated world that was openly hostile to the Kim regime.

Kim Jong Il, at the time North Korea's leader, solved these post-Soviet problems with something called the Songun or "military first" policy. This policy tells North Koreans that the reason they are hungry and impoverished and locked in a police state is because this is all necessary to fund the military and protect from enemies internal and external, so as to keep them safe from the imperialist Americans who would otherwise surely overwhelm them and do unspeakable things.

This is still a continuation of the Japanese far-right ideas carried over from the 1930s and '40s — a pure and unified Korean people beset by inferior races, held together by a deified parent-leader — just updated to keep the Kim regime alive in today's world.

The Songun policy rallies North Koreans behind the regime not despite but because of their poverty, which is said to be a necessary function of the never-ending war against the imperialist American dogs. But keeping this lie alive requires the occasional provocation, just enough to make it look like North Koreans are indeed in a state of quasi-war, and also that the North Korean leaders are bravely and boldly lashing out against their enemies.

These provocations, since the mid-1990s when Songun began, often include nuclear weapons work, such as missile development and nuclear bomb tests, of which this week's is the fourth. Yes, it is also true that nuclear tests are a means by which this very weak country can look so unpredictable that more powerful countries will leave it alone, and it's a way for North Korea to extract concessions from the outside world.

But it is perhaps best understood as the manifestation of that same far-right, ultranationalist ideology that it adapted from its former Japanese masters and has since updated for today's world.

The weeping of North Koreans

This system, mad as it may seem, works. Though North Koreans increasingly do get information about the outside world, contrary to popular misconception not all North Koreans go running for the border as soon as they learn the truth about how poor and miserable their country is. Some studies of North Koreans who sneak across the border into China find that most are economic migrants who willingly go back.

That is the power of race-based ultranationalism of a kind so extreme that only early-20th-century fascist states ever mastered it. It's also why, in 2011, thousands of North Koreans poured into the streets, weeping with anguish — which defectors say was largely earnest — at the death of Kim Jong Il, though he had overseen their descent into poverty and famine.

That moment in 2011, which was widely broadcast in the West and mocked as ridiculous, speaks well to how Americans misunderstand this country. Most assumed the crying was a sort of mass performance, done out of fear and under implicit or explicit order. Because that is how many understand North Korea: a people kept hostage at the point of a gun. And while there's something to that, it hardly explains how this country has stayed together, and this regime had held on, for so long.

Few Americans imagined that this display of quasi-religious devotion, North Koreans' apparent belief that only the strong parent-leader kept them safe, could be real. But it was real, and it still is, and though we might not always see the parallels, it's an ideology that Americans should recognize: It's much the same ideology we fought in a world war only two generations ago.