More than one war in history has started as the result of a miscalculation. The chance of such a wrong move turning the tension on the Korean peninsula into a full-scale conflict is ever increasing, as the young, inexperienced leader of the world's most reclusive state steps up his rhetoric and posturing.
But there's another miscalculation being made by many Western analysts - a common belief that China holds the key to defusing tension on the Korean peninsula, and that Beijing will sacrifice its long-time ally.
China does have leverage with its neighbour. Beijing has long been Pyongyang's closest ally and its biggest economic and diplomatic supporter.
Beijing is estimated to provide up to 90 per cent of its neighbour's energy imports, 80 per cent of its consumer goods and 45 per cent of its food, according to the US-based Council on Foreign Relations.
China has long played a crucial role in maintaining the Kim family's status as the world's only Stalinist dynasty, with a bond of brotherhood emerging between generations of communist allies.
Even as the two nations have carried out social and economic reforms that have taken them in markedly different directions, Chinese leaders have stuck to a carefully worded script to maintain a diplomatic ambiguity in discussing tensions on the Korean peninsula. A series of recent developments, including a rare scolding for Pyongyang from President Xi Jinping , raised hopes that Beijing's stance was changing.
"No one should be allowed to throw a region and even the whole world into chaos for selfish gains," Xi said at the Boao Forum  for Asia in Hainan last month.
Xi is the first top Chinese leader to make public China's apparent frustration with Pyongyang, though he did not name North Korea or its leader, Kim Jong-un. Foreign Minister Wang Yi went one step further by telling UN Secretary General Ban Ki-moon that Beijing would "not allow troublemaking on China's doorstep".
That prompted US diplomatic and security chiefs to hail a subtle shift in China's policy, and the US State Department to speak of good unity between Beijing and Washington on the Korean issue. Those hopes were further raised this week when the state-owned Bank of China closed the account of a North Korean bank accused by Washington of supporting Pyongyang's nuclear programme.
But analysts who have looked at the historical, ideological, economic and diplomatic ties between Beijing and Pyongyang say that the signs are that the evolution in Beijing's long-term policy may be more complicated than some in the West understand.
The relationship between China and Korea has a history deeper than the typical friendly state-to-state relationship. That relationship, especially with the parts of the peninsula that now make up North Korea, goes back more than a millennium to the Han dynasty, which exported Chinese ways to its neighbour, notably in paper-making and literacy and, probably most significantly, Confucianism, according to historian John Keay's 2008 book China: A History.
For most of that time, China and Korea maintained a special relationship in which Chinese emperors saw Korean kingdoms as protectorates while the kingdoms served as tributaries of the imperial court. Chinese historians described such relations as like those between close relatives, rather than neighbours.
In modern times, China shed much blood over Korea, in the first Sino-Japanese war with a humiliating capitulation in 1895, and the Korean war between 1950 and 1953. In between there was the second Sino-Japanese war from 1937, which merged into the second world war.
"Looking back over the millennium of history, one can conclude that the Chinese-North Korean relationship is not just about sympathy between two communist allies," says Professor Wang Xinsheng , a Peking University historian specialising in Northeast Asia. Wang said that bond may complicate China's decision-making over North Korea, as no leader wants to be seen as betraying ancestors.
North Korea in particular has always been seen by the Chinese, imperial, republican and communist alike, as a legitimate sphere of influence. Even ordinary Chinese have traditionally seen North Koreans as akin to siblings. A large Korean community has made China its home.
Strains in the long-standing relationship have only really shown in recent years, after Pyongyang tested a nuclear weapon in October 2006 and China supported UN sanctions. By signing off on the resolution - as well as previous resolutions following North Korea's missile test in July of that year, Beijing appeared to be signalling a shift in tone, from diplomacy to punishment.
China supported strict sanctions after Pyongyang's second nuclear test in May 2009 and harsh UN comments when Pyongyang tested a third bomb in February this year.
But the crux of the issue is this: at what point will Beijing consider a U-turn in its decades-old policy towards Pyongyang? Analysts see several scenarios that would force Beijing to seriously consider a dramatic change of direction.
It is obvious that North Koreans would face starvation, civil strife and the possibility of a regime collapse if China cut off all economic support. But the overwhelming fear is that such a collapse would mean millions of refugees flooding across the border. China's policymakers also fear that the end of the regime could herald a united Korea, leaving a powerful American ally on Beijing's doorstep.
"The current Korean situation has not come to the point that forces policymakers in Beijing to endorse a reunification [led] by the South," Wang said.
There are several other scenarios that would be equally unpleasant for Beijing. One is an escalation in tensions on the peninsula and in the region, bringing an increased US presence.
Dr John Lee, the Michael Hintze fellow with the University of Sydney's Centre for International Security Studies, said China could change its attitude on protecting North Korea if the following things occurred in light of North Korean provocations:
First, if Japan and/or South Korea decided to develop a nuclear weapons capability independent of the US in order to deter Pyongyang, or if Tokyo or Seoul agreed to permanently host US nuclear weapons and other significant military assets, altering the tactical balance in East Asia to China's detriment.
Second, if Washington, using North Korea as justification, and with support from Japan, South Korea and much of Asia, decides to devote significant resources to upgrading missile defence systems that could also blunt China's missile strike capacity.
- Finally, if Pyongyang's provocations became so extreme that China was forced to support a UN Security Council resolution calling for the effective overthrow of the regime in Pyongyang, or the use of all necessary force to prevent the regime from continuing on its current path.
Zhu Feng , a professor of international politics at Peking University, says North Korea's nuclear programme is the most serious threat - so much so that Beijing sees it as the bottom line.
"The Chinese believe that a neighbouring nation like North Korea having its own nuclear attack capacity is not only a serious threat to regional security, but also to the security of China," Zhu said.
Some analysts argue that changing public opinion is also at play in China's decision-making as the new leadership under Xi is more sensitive to the public mood. They say China's new leadership can no longer demand absolute loyalty and justify the legitimacy of single-party rule, thus it is trying harder than before to win over the public through populist policies.
Following decades of free market reform, mainlanders' perception of North Korea is changing, with many now seeing parallels between the totalitarian regime and China's dark days under Mao Zedong's Cultural Revolution. "[Until] now the public feeling towards North Korea has typically been a mixture of disdain, distrust and compassion," Wang said.
But the opinion on North Korea's new, young leader has turned sour recently. On Sina Weibo, China's answer to Twitter, comments over Kim's bellicose stand range from derision to exasperation. The People's Daily warned North Korea not to misjudge the situation. The Global Times called on the government to "exercise necessary sanctions against North Korea".
But Zhang Lifan , a political affairs analyst, said: "The role of public opinion should not be exaggerated to the extent that it would influence foreign-policy making."
Deng Yuwen , former deputy editor of the Communist Party journal Study Times, penned an opinion piece in late February in the Financial Times, in which he argued that "Beijing should give up on Pyongyang and press for the reunification of the Korean peninsula". He was fired from his post within days.
While most analysts see subtle changes taking place, they want to wait and see before judging how genuinely and seriously China has changed course, pointing to the fact that Beijing has previously appeared to respond to global pressure, only to backtrack later.
Shi Yinhong , a professor and regional security expert at Renmin University, says China's policy towards North Korea is changing. But Shi, also an adviser to the central government, says Beijing's ultimate goal is to seek a peaceful solution, not to force a collapse of the North Korean regime.
A Beijing-based South Korean diplomat says he is suspicious about Beijing's sincerity in implementing the UN resolution it signed. And one Chinese diplomat said that Beijing would not cut all its aid to North Korea as US President Barack Obama demanded.
Kerry Brown, a professor of Chinese politics and executive director of the China Studies Centre at the University of Sydney, says China is fine with the status quo.
Brown says the question Beijing faces is "how to encourage and promote reform from within that is not regarded as threatening, and at the same time how to create a strong enough sense of security in the regime that it sees a non-nuclear future as viable".
Brown says these are tough objectives, and so far nobody has been able to solve the puzzle.
"At the end of the day the Chinese, for all they say, are in the best position," Brown said.
"The added complication now is that the last thing China wants to see is another Myanmar," Brown added, referring to the rapid reforms - and corresponding loss of Chinese influence - in Southeast Asia's former hermit state.