Reuters

NORTH KOREA'S ailing dictator, Kim Jong Il, rarely ventures to the airport to greet visiting foreign dignitaries. But China's prime minister, Wen Jiabao, who departed from North Korea on Tuesday October 6th after a three-day visit, is no run-of-the-mill VIP. China has been North Korea's staunchest ally through war and uneasy peace. Fraternal protocol demanded that Mr Kim greet Mr Wen on the tarmac not only with a vigorous handshake but also a prolonged hug.

Officially Mr Wen was in Pyongyang to celebrate the 60th year of diplomatic relations between China and North Korea. But since 1978 the two countries have pursued very different economic policies. China's markets are open to the world; North Korea remains in isolation and its economy is in terrible shape. As winter looms many North Koreans cannot feed or warm themselves. United Nations sanctions and a maritime blockade have squeezed the impoverished country further by cutting off North Korea's most profitable export, weapons.

Mr Kim desperately needs Chinese aid and Mr Wen obliged the North Korean, according to Chinese news reports. China's prime minister signed a broad economic-assistance package with North Korea which has pledged to transform itself by 2012 into KanGsong Taeguk, a strong, prosperous and powerful country.

The package is perhaps in defiance of UN sanctions aimed at halting North Korea's nuclear-weapons programme and missile development. But it may be a carrot intended to draw Mr Kim back into talks aimed at dismantling his nuclear arsenal. In this Mr Wen seems to have succeeded, albeit with a caveat.

North Korea's official news agency says that Mr Kim expressed readiness to hold multilateral talks depending on the outcome of talks between North Korea and America. Mr Kim doubtless wants some of the same things from the Americans that he has got from China: economic assistance, a peace treaty on the Korean peninsula to replace the current armistice and diplomatic relations with Washington. The North Korean leader may want to bequeath to his successor, perhaps his third son, Kim Jong Un, an international environment that is less hostile to North Korea.

James Steinberg, America's deputy secretary of state, says his government is “prepared to have direct engagement with North Korea” if the regime returns to six-party talks with China, Russia, Japan, South Korea and America aimed at getting rid of North Korea's nuclear weapons. These discussions are crucial to Barack Obama's efforts to halt the proliferation of nuclear weapons. America wants to bring North Korea back into the nuclear non-proliferation treaty, which it left in January 2003. America's president plans a nuclear-arms summit in March next year and he desperately needs a diplomatic breakthrough on North Korea. For several months his administration has been trying to convince Japan and South Korea to give their blessing to negotiations between America and North Korea.

North Korea's pledge to recommit itself to “denuclearising the [Korean] peninsula” has failed to impress the South Koreans. Hyun In-taek, South Korea 's minister in charge of relations with North Korea, says “North Korea's recent conciliatory gestures can be regarded as only minor shifts in attitude.” Another complication is that North Korea's leader hinted that he may want Japan excluded from multilateral talks. Mr Kim is angry that Japan continued to raise the issue of the kidnapping of its citizens by his regime at the six-party talks.

Mr Wen's success in eliciting a commitment from North Korea to return to the six-party talks is evidence of its diplomatic muscle. North Korea had, just two months ago, described the talks as “dead”. China has long been criticised for not using its considerable influence to bring North Korea to heel for its nuclear weapons and intercontinental-missile tests. Mr Wen has apparently convinced North Korea to give some ground.