MEMORIES of a war between India and China are still vivid in the Tawang valley, a lovely, cloud-blown place high on the south-eastern flank of the Himalayas. They are nurtured first by the Indian army, humiliated in 1962 when the People's Liberation Army swept into Tawang from next-door Tibet. India now has three army corps—about 100,000 troops—in its far north-eastern state of Arunachal Pradesh, which includes Tawang.

With another corps in reserve, and a few Sukhoi fighter planes deployed last year to neighbouring Assam, they are a meaty border force, unlike their hapless predecessors. In 1962 many Indian troops were sent shivering to the front in light cotton uniforms issued for Punjab's fiery plains. In a weeklong assault the Chinese seized much of Arunachal, as well as a slab of Kashmir in the western Himalayas, and killed 3,000 Indian officers and men. Outside Tawang's district headquarters a roadside memorial, built in the local Buddhist style, commemorates these dead. At a famous battle site, below the 14,000-foot pass that leads into Tawang, army convoys go slow, and salute their ghosts.

@@flash_movie@@chinaindia^@@/flash_movie@@

In wayside villages of solid white houses fluttering with coloured prayer-flags, China's two-week occupation of Tawang is also remembered. Local peasants, aged 60 and more but with youthful Tibetan features, light-brown and creased by the wind, recall playing Sho (Tibetan Mahjong) with the invaders. Many say they remember them fondly: the Chinese, they note, helped get in the wheat harvest that year. “They were little men, but they were always ready to help. We had no problem with them,” says Mem Nansey, an aged potato farmer. The Chinese withdrew to Tibet, their superiority established but their supply lines overstretched, barely a fortnight after they had come. “We weren't sorry to see the back of them, either,” says Mr Nansey, concerned, it seems, that no one should doubt his loyalty to Delhi, 1,500km (930 miles) to the west.

His ambivalence is widely shared. China and India, repositories of 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. The 1962 war was an act of Chinese aggression most obviously springing from China's desire for western Aksai Chin, a lofty plain linking Xinjiang to Tibet. But its deeper causes included a famine in China and economic malaise in both countries. China and India are now the world's fastest-growing big economies, however, and in a year or two, when India overtakes Japan on a purchasing-power-parity basis, they will be the world's second- and third-biggest. And as they grow, Asia's giants have come closer.

Their two-way trade is roaring: only $270m in 1990, it is expected to exceed $60 billion this year. They are also tentatively co-operating, for their mutual enrichment, in other ways: for example, by co-ordinating their bids for the African oil supplies that both rely on. Given their contrasting economic strengths—China's in manufacturing, India's in services—some see an opportunity for much deeper co-operation. There is even a word for this vision, “Chindia”. On important international issues, notably climate-change policy and world trade, their alignment is already imposing.

Their leaders naturally talk up these pluses: at the summit of the BRICs (Brazil, Russia, India, China) in Brasília in April, for example, and during celebrations in Beijing earlier this year to commemorate the 60th anniversary of India's recognition of the People's Republic. “India and China are not in competition,” India's sage-like prime minister, Manmohan Singh, often says. “There is enough economic space for us both.”

China's president, Hu Jintao, says the same. And no doubt both want to believe it. The booms in their countries have already moved millions out of poverty, especially in China, which is far ahead on almost every such measure of progress (and also dismissive of the notion that India could ever rival it). A return to confrontation, besides hugely damaging the improved image of both countries, would plainly jeopardise this movement forward. That is why the secular trend in China-India relations is positive.

Yet China and India are in many ways rivals, not Asian brothers, 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.

Forget Chindia

There are many caveats to the recent improvement in their relationship. As the world's oil wells run dry, many—including sober analysts in both countries—foresee China-India rivalry redrawn as a cut-throat contest for an increasingly scarce resource. The two oil-gluggers' recent co-operation on energy was, after all, as unusual as it was tentative. More often, Chinese state-backed energy firms compete with all-comers, for Sudanese oil and Burmese gas, and win.

Rivalry over gas supplies is a bigger concern for Indian policymakers. They fear China would be more able to “capture” gas by building massive pipelines overnight. Water is already an object of contention, given that several of the big rivers of north India, including the Brahmaputra, on which millions depend, rise in Tibet. China recently announced that it is building a dam on the Brahmaputra, which it calls the Yarlung Tsangpo, exacerbating an old Indian fear that the Beijing regime means to divert the river's waters to Chinese farmers.

As for Chindia, it can seem almost too naive to bother about. Over 70% of India's exports to China by value are raw materials, chiefly iron ore, bespeaking a colonial-style trade relationship that is hugely favourable to China. A proliferating range of Chinese non-tariff barriers to Indian companies, which India grumbles about, is a small part of this. The fault lies chiefly with India's uncompetitive manufacturing. It is currently cheaper, an Indian businessman says ruefully, to export plastic granules to China and then import them again in bucket-form, than it is to make buckets in India.

This is a source of tension. India's great priority is to create millions of jobs for its young, bulging and little-skilled population, which will be possible only if it makes huge strides in manufacturing. Similarly, if China trails India in IT services at present, its recent investments in the industry suggest it does not plan to lag for long.

Yet there is another, more obvious bone of contention, which exacerbates all these others and lies at the root of them: 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—which those aged peasants around Tawang also remember. “The Tibetans came for money and did nothing for us,” said Mr Nansey, referring to the fur-cloaked Tibetan officials who until the late 1940s went from village to village extracting a share of the harvest.

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. When China-India relations are strained, this gives rise to tit-for-tat and mostly bogus accusations of illegal border incursions—for which each side can offer the other's empty cigarette and noodle packets as evidence. In official Indian parlance such proof is grimly referred to as “telltale signs”. It is plainly garbage. Yet this is a carefully rehearsed and mutually comprehensible ritual for which both sides deserve credit, of a sort. 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.

Hands extended—and withdrawn

It would be even better 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—which in 1998 had cited the Chinese threat to justify its decision to test a nuclear bomb—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.

Left, India, right, China, salute

Yet the hopes this inspired have faded. In ad hoc comments from Chinese diplomats and through its state-controlled media—which often refer to Arunachal as Chinese South Tibet—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—after having denied a visa to an Indian official from Arunachal on the basis that he was, in fact, Chinese. It also objected to a $60m loan to India from the Asian Development Bank, on the basis that some of the money was earmarked for irrigation schemes in Arunachal. Its spokesman described a visit to Tawang by Mr Singh, ahead of a general election last year, as “provocative and dangerous”. Chinese analysts warn against understanding from these hints that China has formally revised its position on the border. But that is India's suspicion. And no one, in either country, is predicting a border settlement soon.

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 reported a spate of “incursions” by Chinese troops. China's state-controlled media was more restrained, with striking exceptions. Last year an editorial in the Global Times, an English-language tabloid in Beijing, warned that “India needs to consider whether or not it can afford the consequences of a potential confrontation with China.” Early this year India's outgoing national security adviser and special envoy to China, M.K. Narayanan, accused Chinese hackers of attacking his website, as well as those of other Indian government departments.

Recent diplomacy has brought more calm. Officials on both sides were especially pleased by their show of unity at the United Nations climate meeting in Copenhagen last December, where China and India, the world's biggest and fourth-biggest emitters of carbon gas, faced down American-led demands for them to undertake tougher anti-warming measures. A slight cooling in the America-India relationship, which President George Bush had pushed with gusto, has also helped. So, India hopes, has its appointment of a shrewd Mandarin-speaker, Shivshankar Menon, as its latest national security adviser and special envoy to China. He made his first visit to Beijing in this role last month; a 14th round of border talks is expected. And yet the China-India relationship has been bruised.

Negative views

In China, whose Communist leaders are neither voluble nor particularly focused on India, this bruising is mostly clear from last year's quarrel itself. The Chinese, many of whom consider India a dirty, third-rate sort of place, were perhaps most obviously to blame for it. This is despite China's conspicuous recent success in settling its other land disputes, including with Russia and Vietnam—a fact Chinese commentators often cite to indicate Indian intransigence. Chinese public opinion also seems to be turning against India, a country the Chinese have been wont to remark on fondly, if at all, as the birthplace of Buddhism. According to a recent survey of global opinion released by the BBC, the Chinese show a “distinct cooling” towards India, which 47% viewed negatively.

In garrulous, democratic India, the fallout is easier to gauge. According to the BBC poll, 38% of Indians have a negative view of China. In fact, this has been more or less the case since the defeat of 1962. Lamenting the failure of Indian public opinion to move on, Patricia Uberoi, a sociologist at Delhi's Centre for the Study of Developing Societies, notes that while there have been many Indian films on the subcontinent's violent partition, including star-crossed Indo-Pakistani romances, there has been only one notable Indian movie on the 1962 war: a propaganda film called “Haqeeqat”, or “Truth”, supported by the Indian defence ministry.

Hawkish Indian commentators are meanwhile up in arms. “China, in my view, does not want a rival in Asia,” says Brajesh Mishra, a former national security adviser and special envoy to China, who drafted the 2005 agreement and is revered by the hawks. “Its main agenda is to keep India preoccupied with events in South Asia so it is constrained from playing a more important role in Asian and global affairs.” Senior officials present a more nuanced analysis, noting, for example, that India has hardly been alone in getting heat from China: many countries, Asian and Western, have similarly been singed. Yet they admit to heightened concern over China's intentions in South Asia, and foresee no hope for a settlement of the border. Nicholas Burns, a former American diplomat who led the negotiations for an America-India nuclear co-operation deal that was concluded in 2008, and who now teaches at Harvard University, suspects that over the past year China has supplanted Pakistan as the main worry of Indian policymakers. He considers the China-India relationship “exceedingly troubled and perturbed” and thinks that it will remain “uneasy for many years to come”.

Fear of encirclement

For foreign-policy realists, who see China and India locked in a battle for Asian supremacy, this is inevitable. Even fixing the border could hardly mitigate the tension. More optimistic analysts, and there are many, even if currently hushed, consider this old-school nonsense. Though both India and China have their rabid fringe, they say, they are rational enough to know that a strategic struggle would be sapping and, given each other's vast size, unwinnable. Both are therefore committed, as they claim, to fixing the border and fostering better relations. Yet there are a few impediments to this—of which two are most often cited by analysts in Beijing and Delhi.

One is represented by the America-India nuclear deal, agreed in principle between Mr Singh and Mr Bush in 2005. Not unreasonably, China took this as a sign that America wanted to use India as a counterweight to China's rise. It also considered the pact hypocritical: America, while venting against China's ally, North Korea, going nuclear (which it did a year later), was offering India a free pass to nuclear-power status, despite its refusal to sign the Nuclear Non-Proliferation Treaty. Indian analysts believe that China, in a cautious way, tried to scupper the deal by encouraging some of its opponents, including Ireland and Sweden, to vote against it in the Nuclear Suppliers Group, a 46-member club from which it required unanimous approval.

This glitch reflects a bigger Chinese fear of encirclement by America and its allies, a fear heightened by a recent burst of American activity in Asia. The United States has sought to strengthen security ties with South-East Asian countries, including Vietnam and Indonesia. It has also called on China, in an unusually public fashion, to be more accommodating over contested areas of the South China Sea—where America and India share concerns about a Chinese naval build-up, including the construction of a nuclear-submarine base on the Chinese island of Hainan. In north-east Asia, America has launched military exercises with South Korea in response to North Korea's alleged sinking of a South Korean warship in March. Some Chinese analysts, with ties to the government, consider these a direct challenge to China.

China is deeply suspicious of America's military campaign in nearby Afghanistan (and covertly in Pakistan), which is supported from bases in Central Asian countries. It is also unimpressed by a growing closeness between India and Japan, its main Asian rival. Japanese firms are, for example, expected to invest $10 billion, and perhaps much more, in a 1,500km “industrial corridor” between Delhi and Mumbai. In 2007 Japanese warships took part in a naval exercise in the Bay of Bengal, also involving Indian, Australian and Singaporean ships and the American nuclear-powered vessels USS Nimitz and USS Chicago, which was hosted by India and was the biggest ever held in the region.

This seemed to back a proposal, put about by American think-tankers, for an “axis of democracies” to balance China. Officially, India would want no part of this. “We don't want to balance China,” says a senior Indian official. But, he adds, “all the democracies do feel it is safer to be together. Is China going to be peaceful or not? We don't know. In the event that China leaves the path of peaceful rise, we would work very closely together.”

India also fears encirclement, and with reason. America's Pentagon, in an annual report on China's military power released on August 16th, said China's armed forces were developing “new capabilities” that might extend their reach into the Indian Ocean. China has also made big investments in all India's neighbours. It is building deepwater ports in Pakistan and Bangladesh, roads in Nepal and oil and gas pipelines in Myanmar. Worse, it agreed in 2008 to build two nuclear-power plants for its main regional ally, Pakistan—a deal that also worried America, who saw it as a tit-for-tat response to its nuclear deal with India. (China has become Pakistan's biggest supplier of military hardware, including fighter jets and guided-missile frigates, and in the past has given it weapons-grade fissile material and a tested bomb design as part of its nuclear support.)

Muffling Tibet

Hawkish Indians consider these Chinese investments as a “string of pearls” to throttle India. Wiser ones point out that India is too big to throttle—and that China's rising influence in South Asia is an indictment of India's past inability to get on with almost any of its neighbours. Under Mr Singh, India has sought to redress this. It is boosting trade with Sri Lanka and Bangladesh, and sticking, with commendable doggedness in the face of little encouragement, to the task of making peace with Pakistan. That would be glorious for both countries; it would also remove a significant China-India bugbear.

The other great impediment to better relations is Tibet. Its fugitive Dalai Lama and his “government-in-exile” have found refuge in India since 1959—and China blames him, and by extension his hosts, for the continued rebelliousness in his homeland. A Tibetan uprising in March 2008, the biggest in decades, was therefore a major factor in last year's China-India spat. It led to China putting huge pressure on India to stifle the anti-China Tibetan protests that erupted in India—especially one intended to disrupt the passage of the Olympic torch through Delhi en route to Beijing. It also objected to a visit to Tawang by the Dalai Lama last November, which it predictably called a “separatist action”. This visit, from which leftover banners of welcome still festoon the town's main bazaar, perhaps reminded China why it is so fixated on Tawang—as a centre of the Tibetan Buddhist culture that it is struggling, all too visibly, to control.

Mindful of the huge support the Dalai Lama enjoys in India, its government says it can do little to restrict him. Yet it policed the protest tightly, and also barred foreign journalists from accompanying him to Tawang. India would perhaps rather be spared discreet balancing acts of this sort. “But we're stuck with him, he's our guest,” says V.R. Raghavan, a retired Indian general and veteran of the 1962 war. Indeed, many Indian pundits consider that China will never settle the border, and so relinquish a potential source of leverage over India, while the 75-year-old lama is alive.

A dangerous child

After his death, China will attempt to control his holy office as it has those of other senior lamas. It will “discover” the reincarnated Dalai Lama in Tibet, or at least endorse the choice of its agents, and attempt to groom him into a more biddable monk. In theory that would end a major cause of China-India discord, but only if the Chinese can convince Tibetans that their choice is the right one, which seems unlikely. The Dalai Lama has already indicated that he may choose to be “reborn” outside China. There is talk of the important role Tawang has often played in identifying incarnations of the Dalai Lama, or even that the 14th may choose to reincarnate in Tawang itself.

For the abbot of Tawang's main monastery, Guru Tulku Rinpoche, that would be a great blessing. “If his holiness chooses to be born in Tawang, we would be so happy,” he says in his red-carpeted monastic office, as half a dozen skinny lads file in to be inducted into monkhood. Silently, they prostrate themselves before the abbot, while he scribbles down their new monastic names. Outside his window, the early morning sun sparkles through the white clouds that hang low over Tawang. It is hard to think that this remote and tranquil spot could have caused such a continent-sized ruckus. Yet, if the abbot has his wish, it will cause a lot more trouble yet.