INDIA and China, home to 40% of the world's people, are often unsure what to make of each other. Since re-establishing diplomatic ties in 1976, after a post-war pause, they and their relationship have in many ways been transformed. A war in 1962 was an act of Chinese aggression most obviously springing from China's desire for a lofty plain that lies between Jammu & Kashmir and north-western Tibet.

The two countries are in many ways rivals and their relationship is by any standard vexed as recent quarrelling has made abundantly plain. If you then consider that they are, despite their mutual good wishes, old enemies, bad neighbours and nuclear powers, and have two of the world's biggest armies with almost 4m troops between them this may seem troubling. One obvious bone of contention is the 4,000km border that runs between the two countries. Nearly half a century after China's invasion, it remains largely undefined and bitterly contested. The basic problem is twofold. In the undefined northern part of the frontier India claims an area the size of Switzerland, occupied by China, for its region of Ladakh. In the eastern part, China claims an Indian-occupied area three times bigger, including most of Arunachal. This 890km stretch of frontier was settled in 1914 by the governments of Britain and Tibet, which was then in effect independent, and named the McMahon Line after its creator, Sir Henry McMahon, foreign secretary of British-ruled India. For China which was afforded mere observer status at the negotiations preceding the agreement the McMahon Line represents a dire humiliation.

China also particularly resents being deprived of Tawang,which though south of the McMahon Line was occupied by Indian troops only in 1951, shortly after China's new Communist rulers dispatched troops to Tibet. This district of almost 40,000 people,scattered over 2,000 square kilometres of valley and high mountains, was the birthplace in the 17th century of the sixth Dalai Lama (the incumbent incarnation is the 14th). Tawang is a centre of Tibet's Buddhist culture, with one of the biggest Tibetan monasteries outside Lhasa. Traditionally, its ethnic Monpa inhabitants offered fealty to Tibet's rulers.

Making matters worse, the McMahon Line was drawn with a fat nib,establishing a ten-kilometre margin for error, and it has never been demarcated. With more confusion in the central sector, bordering India's northern state of Uttarakhand, there are in all a dozen stretches of frontier where neither side knows where even the disputed border should be. In these “pockets”, as they are called, Indian and Chinese border guards circle each other endlessly while littering the Himalayan hillsides as dogs mark lampposts to make their presence known.

Despite several threatened dust-ups including one in 1986 that saw 200,000 Indian troops rushed to northern Tawang district there has been no confirmed exchange of fire between Indian and Chinese troops since 1967. It would be best if the two countries would actually settle their dispute, and, until recently, that seemed imaginable. The obvious solution, whereby both sides more or less accept the status quo, exchanging just a few bits of turf to save face, was long ago advocated by China, including in the 1980s by the then prime minister, Deng Xiaoping. India's leaders long considered this politically impossible. But in 2003 a coalition government led by the Hindu-nationalist Bharatiya Janata Party launched an impressive bid for peace. For the first time India declared itself ready to compromise on territory, and China appeared ready to meet it halfway. Both countries appointed special envoys, who have since met 13 times, to lead the negotiations that followed. This led to an outline deal in 2005, containing the “guiding principles and political parameters” for a final settlement. Those included an agreement that it would involve no exchange of “settled populations” which implied that China had dropped its historical demand for Tawang.

Yet the hopes this inspired have faded. In ad hoc comments from Chinese diplomats and through its state-controlled media China appears to have reasserted its demand for most of India's far north-eastern state. Annoying the Indians further, it started issuing special visas to Indians from Arunachal and Kashmir. In fact, the relationship has generally soured. Having belatedly woken up to the huge improvements China has made in its border infrastructure, enabling a far swifter mobilisation of Chinese troops there, India announced last year that it would deploy another 60,000 troops to Arunachal. It also began upgrading its airfields in Assam and deploying the Sukhois to them. India's media meanwhile has reported a spate of “incursions” by Chinese troops.