World powers greeted the death of Kim Jong-il with a curious mix of anxiety and optimism yesterday, acknowledging the risks that a freshly unstable situation would create at the same time as expressing hope that the passing of the "Dear Leader" would create an opportunity for reformists to exert greater influence.
Pyongyang launched a short-range missile test within hours of the announcement of Mr Kim's death, a move that seemed to some to indicate that the regime was as unpredictable and dangerous as ever. Besides the longer-term ramifications, the news of his death came at a complex moment for relations between North Korea and the US, with a third round of diplomatic talks expected soon and badly-needed food aid to Pyongyang under debate.
But US officials insisted the tests were unrelated and Gen Martin Dempsey, chairman of the Joint Chiefs of Staff, said that there had been no changes "of a nature that would alarm us".
Meanwhile, as Venezuelan President Hugo Chavez mourned Mr Kim as a "comrade" and Moscow sent its condolences for North Korea's "loss", western powers largely struck a note of relief. Foreign Secretary William Hague said that Mr Kim's death could prove a "turning point," but added that it was "difficult to be optimistic" about the country's future.
But outside of its allies, North Korea's future will be most meaningfully shaped by its neighbour to the South and the US. The South Korean government and its American allies have long prepared for internal collapse in the North, drawing up contingency plans and revising them in line with the fluctuating conditions in the divided peninsula.
Seoul and Washington have been careful about broadcasting the programme due to the sensitivities of Pyongyang and Beijing. But the plan currently in place projects a huge deployment of humanitarian and economic resources into the North backed by a substantial military presence to take over the country's nuclear and armament facilities.
At the same time, the border would be closed in an effort to prevent a mass influx of refugees which could threaten to destabilise the South adding to the estimated $3m (31.9m) cost of reunifying the two Koreas.
A South Korean government document stated that the key role would be played by an "administration office headed by the Unification Minister which will be launched to bring the North under emergency rule".
The existence of what became known as CONPLAN (Conceptual Plan) 5029 has been known at least since August 1999 when Gen John H Tilelli, commander-in-chief of US Forces Korea, acknowledged its existence. "It would be unusual if we didn't have one, and we are preparing for any course of action," he said, but refused to go into details.
Aspects of the military elements in the plans had led to disagreements among the allies. In 2005, with the then South Korean president Roh Moo-hyun pursuing a foreign policy more independent from Washington, Seoul rejected an American proposal to be put in charge of the South's military capability in the event of a Northern collapse because "it would restrict the Republic of Korea's exercise of its sovereignty".
However, this changed in 2009 under the Lee Myung-bak administration which reportedly asked for 5029 to become a full operational plan at a time of heightened tension between the two Koreas.
General Walter Sharp, head of US forces in Korea, said discussions were taking place with South Korea's defence chiefs over instability in the North. It is believed the agreement was that any such mission would remain under South Korean command.
However, South Korea itself would face severe financial problems in rescuing North Korea. The World Bank, and other international bodies, estimate that the cost of reunification could be as high as $ 3 trillion, about five times the size of the South's GDP.