It was classic Kim Jong-un. There was the young North Korean dictator, flanked by his aging military brass, examining plans for a missile launch into waters around Guam, a US territory, in a large conference room. Mr. Kim was wearing a black Mao suit and horn-rimmed glasses and sporting his signature pompadour. With a baton in hand, he pointed at a map that detailed the missiles’ flight path. A satellite image of Andersen Air Force Base, which is located on Guam, was projected on a wall at the front of the room.

The staged tableau, shown in photographs released by North Korea’s state media on Aug. 15, is undoubtedly provocative, as it was intended to be after a series of ominous exchanges between Kim and President Trump over Pyongyang’s latest missile tests. But a statement released with the photos signaled that North Korea was pulling back. It said Kim would wait to assess “the foolish and stupid conduct” of the United States before he decides to launch any missiles toward Guam. While many people were quick to write off the episode, experts say it was at least a partial victory for the Kim regime.

KCNA/REUTERS North Korean leader Kim Jong-un and military leaders look on during the test of an intercontinental ballistic missile in July.

“Kim Jong-un and North Korea are being taken seriously now,” says Michael Madden, who runs the North Korea Leadership Watch website and closely studies Kim. “This is the attention they want. They want to be taken seriously as a country with nuclear arms and formidable missiles.”

In one sense, the leader’s strategy of stomping his feet so the rest of the world will take notice is straight from the playbook of his father and grandfather, who, along with the current Kim, have ruled the hermit kingdom for 70 consecutive years. But after his nearly six years in power, it’s clear there are some significant differences between Kim and his forebears, and that he is exhibiting a ruling style that has evolved in unexpected ways.

He has consolidated power more quickly than most people expected, ruled with a ruthlessness unusual even for the North, and embraced limited market reforms. He’s also driving the country’s nuclear weapons program rapidly toward a status that would put it in an elite global club.

That program has long been characterized as an insurance policy for a country deeply suspicious of foreign powers and committed to an ideology of self-reliance. But Go Myong-hyun, a research fellow at the Asan Institute for Policy Studies in Seoul, South Korea, contends that it is about far more than protecting the Kim dynasty. He says the youngest Kim has demonstrated unbridled ambition for restoring what he sees as his country’s rightful place in the world.

“Kim Jong-un has very grandiose ideas about himself and North Korea,” Dr. Go says. “He wants to make his country a regional power, not just survive, and the shortcut to getting there is nuclear weapons.”

The question is what all this means for the US and the rest of the world. After the recent tart words between Kim and Mr. Trump, many Americans were wondering, perhaps even half seriously, whether they should start building fallout shelters in their backyards again.

Such fears are premature, but containing North Korea certainly won’t be easy. Kim’s insatiable nuclear ambitions and compulsion to have Pyongyang taken seriously, coupled with Trump’s unpredictability and desire to reassert American power, mean the world may be heading for one of the more fraught periods since the Cuban missile crisis. At the very least, Kim may have now pushed his country’s nuclear program to the point where he doesn’t bend either to overtures and pressures from China or threats from the US.

“He knows he’s in the driver’s seat,” says Max Baucus, the former US ambassador to China. “It’s very dangerous, too, because I think he may get away with it. That is, get away with building up his nuclear and missile capabilities so that he becomes a nuclear power.”

WONG MAYE-E/AP/FILE North Korean schoolgirls holding brooms bow toward a mural showing the late North Korean leader Kim Il-sung giving a speech.

In mid-August, as North Korea was preparing to launch its four intermediate-range ballistic missiles toward Guam, the country held a five-day celebration for the entire ruling Kim family. High school students marched in Pyongyang. Soldiers laid flowers in front of statues of Kim Il-sung and Kim Jong-il, the first two leaders of North Korea. And officials sang the praises of the current regime. “Long Live General Kim Jong-un, the Sun of the 21st Century,” one banner read.

The Kim family would appear to have much to celebrate. It has survived in power far longer than almost anyone thought possible, and its nuclear weapons program has now progressed to the point where it could prolong the family’s rule indefinitely. The latest major breakthrough came in July, when North Korea tested two intercontinental ballistic missiles that analysts say are capable of reaching Alaska and the US mainland. In late August, it launched three more short-range missiles into the sea, as the US and South Korea conducted annual joint military drills that Pyongyang considers an invasion rehearsal.

North Korea’s nuclear efforts have​ expanded most rapidly under the 33-year-old Kim, who was virtually unknown to the world at the start of the decade. Until a year before he came to power, in 2011, nobody knew his age or the correct spelling of his name. No one had even seen a photograph of him as an adult.

Kim has since earned the reputation of being a ruthless dictator (ordering, it is widely believed, the execution of his uncle and the assassination of his half brother) and an international pariah (with his brinkmanship with the US and open mocking of the United Nations). He has long been thought of as a narcissist and megalomaniac.

Despite his reputation, many experts agree that behind the bombast and cult of personality lies a rational, if brazen, leader who sees nuclear weapons as his only hope for survival. Although Kim has taken a step back from the brink of nuclear war with the US, it is conceivable that he will never give up his weapons for that reason alone.

“He is looking for security,” says Scott Snyder, a senior fellow for Korea studies at the Council on Foreign Relations in Washington. “He feels vulnerable, and he probably always will.”

DAMIR SAGOLJ/REUTERS/FILE Taxis roam an empty street in Pyongyang, North Korea. More taxis and cars have been seen recently on roads as consumer spending has picked up.

Few world leaders have lives as impenetrable as Kim’s. ​His position as ruler of one of the most isolated and secretive countries can make any attempt to discern his ultimate motives like trying to grab a handful of fog. The same goes for trying to piece together his biography. Former basketball star Dennis Rodman and Kenji Fujimoto, a former sushi chef for the Kim family, are two of the few people outside North Korea who have met with him since he’s been in power. Kim has yet to travel overseas or host a visit from another head of state.

As a result, much of what we think we know about Kim’s life is based on rumor and speculation. False claims and wild conjectures abound. In late 2013, for example, a Hong Kong newspaper published an article saying the young leader had his uncle, Jang Song-thaek, killed by a pack of ravenous dogs. Other unconfirmed reports said Mr. Jang was executed by machine gun or mortar fire. All that anyone seems to agree on is that he is dead, along with perhaps as many as 140 other senior officials whom Kim likely saw as threats to his rule.

“Kim Jong-un was very vulnerable at the beginning because he was so young and inexperienced,” says Natasha Ezrow, a senior lecturer at the University of Essex and coauthor of the book “Dictators and Dictatorships.” More recently, Kim is suspected of having ordered the assassination of his half brother, Kim Jong-nam, who was killed with a VX nerve agent at an airport in Malaysia earlier this year. “This is a guy who is trying to prove something,” Dr. Ezrow says. “He has acted very insecurely.”

Ezrow is quick to point out, however, that Kim has had good reasons to feel insecure. Outside North Korea, many assumed Kim was the supreme leader in name only when he first came to power. It was widely believed that his uncle, who had stepped in as de facto regent when Kim’s father had a stroke in 2008, was really the one in charge. At first glance, the younger Kim didn’t seem to fit the mold. Not only was he his father’s third son – first sons are usually groomed for such a role in North Korea’s traditional society – his mother was considered “impure” within the North Korean caste system for having been born in Japan.

Yet as early as 2010, when Kim first appeared in North Korean state media, it was clear that his two older brothers had fallen out of favor with their father. The eldest son, Kim Jong-nam, is said to have preferred partying to politics, while the second son, Kim Jong-chol, was considered too effeminate. In September 2010, Kim Jong-un was presented as a four-star general and vice chairman of the nation’s Central Military Commission. The announcement sent an unequivocal message about which son Kim Jong-il had chosen as his successor.

There were earlier signs, too. Kim Jong-un was reportedly adored by his father when he was young. Mr. Madden, who runs the North Korea watch website, says the young leader grew up in an atmosphere of extreme privilege but great isolation. He was raised by his mother to think he was the chosen one,​ ​Madden says, a kind of upbringing that “can warp your thinking.” That job now falls to the North Korean state media, which works tirelessly to perpetuate Kim’s cult of personality.

Kim is believed to have studied in Switzerland pretending to be the son of a North Korean diplomat for at least four years. Every day, an embassy driver picked him up from school and drove him home. He was rarely allowed to play with friends his own age. An undistinguished student, Kim is remembered as having been fond of video games, “James Bond” films, rollerblading, and basketball. The Chicago Bulls have long been his favorite NBA team, and Michael Jordan his favorite player (Mr. Rodman also played for the Bulls).

“When he started to play basketball, he was telling his brother what to do,” Mr. Fujimoto, the sushi chef, told “Frontline” in 2014. “Sometimes I wondered whether Kim Jong-un wasn’t really the older brother.”

DAMIR SAGOLJ/REUTERS A woman works at a textile mill in Pyongyang, North Korea. Though the country is still destitute, the economy has improved under Kim Jong-un.

Perhaps in some ways, Kim’s eccentric childhood prepared him well for his current role. While he is often derided in the West as being an unhinged dictator and a chubby brat – “a total nut job,” in the words of Trump – Madden says there is a method to his madness.

“The North Koreans want people to think they are crazy because then they will underestimate them or overestimate what they are capable of,” he says. “Being unpredictable gives them a lot of psychological power.”

One of the distinguishing characteristics of Kim’s regime has been its ability to exploit that unpredictability for its own benefit. It has a long history of issuing threats and ultimatums that don’t necessarily lead to action but still throw North Korea into the international spotlight. “Kim Jong-un is playing with fire,” says Go of the Asan Institute, “but so far he’s been very careful at it.”

To be sure, North Korea has developed a nuclear program that is advanced enough to back up Kim’s tough talk. Since he came to power in 2011, the country has conducted three of its five nuclear bomb tests and about 80 missile tests, more than twice as many as under his father and grandfather combined. A sixth nuclear test could occur any day. What’s more, The Washington Post recently reported that North Korea may have succeeded in miniaturizing a nuclear warhead that can fit inside its missiles.

There is no question how important North Korea’s nuclear arsenal is to Kim. He is well aware of what happened to Muammar Qaddafi of Libya when he negotiated away his program. Yet experts agree that Kim isn’t interested in carrying out a first strike against the US or South Korea. He knows that such a move would be suicidal. Instead, he sees his bombs and missiles as a way to force the world to accept the North as a full member of the international community and to negotiate with the US on his terms.

“He feels that if he races towards a weapon that can reach the US, Washington will be forced to the table and will come up with concessions,” says Stephan Haggard, a North Korea analyst and visiting fellow at the Peterson Institute for International Economics in Washington. But concessions aren’t all Kim is after, Dr. Haggard says, adding that the young leader wants the US to recognize North Korea as a nuclear power.

“Kim Jong-un is very clever,” Haggard says. “He is playing a weak hand extraordinarily well.”

KOREAN CENTRAL NEWS AGENCY/AP/FILE North Korean leader Kim Jong-un (middle) and his wife, Ri Sol-ju, watch a musical performance in North Korea in a photo released in 2012.

At around 5 a.m. on April 13, dozens of foreign journalists gathered in a hotel lobby in Pyongyang. The journalists had come to the North Korean capital as part of a government-sponsored trip to mark the 105th birthday of Kim Il-sung, the country’s founder, who is still revered as a godlike figure. The previous night, according to Reuters, government officials had told them that a “big and important” event was scheduled for the morning.

After a two-hour security check at the People’s Palace of Culture, the reporters were bused to their final location: a ribbon-cutting ceremony for Ryomyong Street, a residential high-rise project in central Pyongyang. Reuters reported that the street contained more than 20 buildings, each about 30 to 40 stories tall. North Korean officials said they had been built in less than a year.

“The completion of this street is more powerful than 100 nuclear warheads,” Premier Pak Pong-ju said in a speech at the ceremony, according to the Los Angeles Times. Kim didn’t speak but instead waited on stage for the unfurling of a red ribbon. After cutting it, he stepped into a black Mercedes limousine and drove away.

The spectacle of one of North Korea’s top government officials comparing a block of high-rise apartments to nuclear weapons is telling about the Kim regime’s priorities. The comparison goes to the heart of “byungjin,” or parallel advance, Kim’s policy of developing the economy alongside the nuclear program. His argument is that only a nuclear deterrent will grant North Korea the security it needs to focus on the economy.

Cai Jian, an expert on North Korea who teaches at Fudan University in Shanghai, China, says that so far the policy has shown signs of success. North Korea has achieved modest economic growth in recent years, an impressive feat given the increasingly tough sanctions leveled against it. Dr. Cai attributes that growth to market-oriented reforms that have improved access to food and goods and loosened the state’s control.

“The improvement over the past few years is quite obvious,” Cai says. Aside from the building boom in Pyongyang, visitors to the capital have reported seeing large numbers ​of cars and trucks on its streets. At the same time, marketplaces have opened in cities across the country to accommodate a growing class of merchants and entrepreneurs.

“Kim Jong-un has helped deliver economic growth that North Korea has not seen in decades,” says Andrei Lankov, a North Korea expert at Kookmin University in Seoul and the director of Korea Risk, a consultancy group.

Indeed, North Korea’s economy grew at its fastest pace in 17 years in 2016, according to data released by South Korea’s central bank in July. But Dr. Lankov says North Korean elites have accumulated much of the new wealth and that income inequality is actually rising. The country remains deeply impoverished, especially in the countryside. Two in 5 North Koreans are undernourished, and more than 70 percent of the population relies on food aid, according to a UN report published in March.

Experts such as Lankov say Kim is nonetheless widely popular among North Koreans. How much of that support is due to propaganda and fear is, like so much else about the enigmatic leader, unknown. It doesn’t hurt that Kim gets in periodic fiery spats with the US. North Koreans are taught as early as kindergarten that the US is the world’s singular vill​ai​n.

So when Kim taunts Washington with his histrionic rhetoric – and Trump responds with his own ​threats – some analysts argue it plays into the narrative of North Korea as a feisty underdog standing up to the pernicious superpower.

“Inside North Korea, this propaganda is everywhere: The big, bad United States is preparing to attack us, and our leader, Kim Jong-un, is building nuclear weapons to defend us,” Jean H. Lee, a former journalist who reported from Pyongyang and is now a global fellow at the Woodrow Wilson International Center for Scholars, wrote in a recent op-ed in The New York Times.

That may be one reason Kim’s regime is able to justify spending at least an estimated one-fifth of its national budget on defense while millions of North Koreans go hungry. In the end, however much this government-fueled nationalism is a factor in mollifying the public, one thing seems certain: Even in the face of overwhelming economic hardship, to say nothing of the mounting international pressure, Kim is still very much in charge.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

“Kim Jong-un’s style is smart and pragmatic, even though it’s often quite brutal,” Lankov says. “For the Kim family to stay in power, he was the perfect choice.”

Contributing to this report were staff writer Peter Ford in Paris and Xi Yujuan in Beijing.