The heightened tension between Pakistan and India has tested the strength of friendship between Pakistan and its most important strategic and military ally, China.

Pakistani President Pervez Musharraf received a much cooler reception this week than on his previous trip just weeks ago.

President Musharraf met Chinese Prime Minister Zhu, but not the president

He met Chinese Prime Minister Zhu Rongji, but Beijing said that was only at Pakistan's request, and there was no meeting with Chinese President Jiang Zemin.

China's sudden wariness does not mean its alliance with Pakistan is about to end, but its relations with its South Asian neighbours are changing.

In the past everything was clear: Pakistan was China's ally, India their common foe.

But in the last two years relations with India have rapidly begun to thaw, and at the same time China has begun to have serious misgivings about Pakistan's policy in Kashmir.

Chinese fears

The 1999 Kargil crisis was a major turning point.

President Pervez Musharraf had hoped for a clear sign of support

During the winter that year, Pakistan inserted large number of troops into Indian-controlled territory around Kargil in Indian-administered Kashmir, sparking fierce fighting that brought the two countries to the brink of war.

Publicly China said little, privately it was deeply perturbed by Pakistan's provocation.

Concern has also been growing in China that Muslim militant groups based in Pakistan are helping to train separatist fighters from China's own restive region of Xinjiang.

Now China is faced with a new crisis brewing on its southern frontier and Beijing is making clear the last thing it wants is a crisis to turn into conflict.

As one western diplomat in Beijing put it: "They've suddenly realised they've got this unstable government, Islamic radicals and nuclear bombs sitting around, and this tends to be a Chinese leader's nightmare. They don't want things blowing up in their face."