SEOUL, South Korea — Between American threats of “fire and fury” and North Korea’s vow to unleash a “historic enveloping fire” on a U.S. territory, the war of words between Pyongyang and Washington has suddenly raised fears of escalating into an actual war.

It also has brought a rush of speculation about the brinkmanship at play – including trying to understand the moves and motives of the North’s leader, Kim Jong Un.

With his unequivocal words, Trump appeared intent on sending a message to North Korea – and to its traditional backer China – that enough was enough, according to administration officials.

But with Kim, the endgame is all about seeking to stay in power, analysts said.

“What Kim Jong Un really wants is to improve his missiles and nuclear weapons and to keep the country under his leadership,” said Michael Madden, who runs the North Korea Leadership Watch website.

Although the Western caricature of the 33-year-old Kim is of a pudgy madman with a funny hairdo, he has been a textbook dictator, making rational decisions for someone who wants to retain absolute power.

On Thursday, South Korea’s National Security Council urged North Korea to calm down, offering the prospect of talks, while its military issued a much sterner warning. The Joint Chiefs of Staff said North Korea would suffer “strong and resolute retaliation” from American and South Korean forces if it mounted an attack on either country.

The warnings came after North Korea earlier Thursday made an unusually specific threat. In a statement attributed to the North Korean army’s strategic forces commander, Pyongyang threatened to fire four intermediate-range Hwasong-12 ballistic missiles “3,356.7 kilometers for 1,065 seconds” – nearly 18 minutes – by the middle of this month, saying they would fly over Japan and land within 18 to 25 miles of Guam, the American territory in the Pacific that is home to Air Force and Navy bases.

This threat was not made in response to Trump’s “fire and fury” remarks – the wheels of Kim’s bureaucracy move more slowly than Trump’s – but rather in reaction to the U.S. launching a Minuteman III intercontinental ballistic missile from Vandenberg Air Force Base in California on Aug. 2.

A war remains in no one’s interest – especially not in that of the 25 million South Koreans who live within range of North Korea’s conventional artillery – but the combination of two tempestuous leaders with nuclear codes has created an atmosphere where anything seems possible.

The Kims have kept a tight grip on North Korea internally through a brutal system of repression and fear, and have increasingly kept the outside world at bay by developing nuclear weapons and the means to deliver them. This has traditionally been viewed as a deterrent to fend off the kind of fate that Saddam Hussein suffered in Iraq and Moammar Gadhafi endured in Libya.

While his weapons might work as a deterrent, it would be suicidal for Kim to actually use them and risk retaliation by the much more powerful American military.

“Kim Jong Un is not trying to pick a fight,” Madden said.

An American analyst who is in contact with senior North Korean officials, Madden said Pyongyang is well aware that Trump has a habit of speaking – or tweeting – off the cuff.

“North Koreans are not taking this seriously. They’re saying that Trump is saying these kinds of things because he hasn’t ‘consolidated his power’ yet,” he said – using a line that American experts use to describe questionable things Kim does.

Cheong Seong-chang, a North Korean leadership expert at the left-leaning Sejong Institute in the South, agreed with Madden that Kim does not want actual conflict with the United States.

“North Korea is not developing ICBM technology to start a war with the U.S.” Cheong said. “This is all about preventing the U.S. from intervening in any military conflict on the Korean Peninsula. It wants to influence American decisions. The U.S. does not want to be criticized for risking American lives to protect its allies.”

Others see a ploy by North Korea to ratchet up the tensions and make the most progress on its weapons program before sanctions bite and it is forced to return to the negotiating table.

“The U.S. will only agree to talk with the North if it thinks a physical clash is imminent,” said Koo, the former South Korean intelligence official. “The North is not aiming for a clash but increasing the tension to create an environment for negotiation.”

But behind the assessment of Kim as a rational, if brutal, leader with a master game plan lies a worrying precedent. Rational leaders of new nuclear states with a small number of weapons tend to be most reckless in their early years, said Van Jackson, an expert on North Korean security issues at Victoria University in New Zealand.

“There’s a temptation to see how much juice they can squeeze out of these weapons that they’ve spent so much money and effort making,” he said, adding that this created more pressure, not less, to demonstrate nuclear capability.