This week's visit to India by Li Keqiang, the Chinese premier, could not have happened at a better time. Tensions had been high, because of a boundary dispute touched off when Chinese troops reportedly pushed almost 30 kilometres into Indian territory in the icy Himalayan region of Ladakh.
Mr Li and his host, Manmohan Singh, the Indian prime minister, said the two sides had agreed on terms of reference for resolving the issue. Coming as it did just after a visit to Beijing by India's foreign minister Salman Khurshid, Mr Li's voyage may serve to remind the world's two most populous countries of how much can be gained by good relations.
The Chinese troops have now withdrawn, demonstrating that India was wise not to overreact. After all, trade relations between the two countries are too important for either side to jeopardise. China became India's largest trading partner last year, with two-way commerce totalling US$66 billion (Dh242bn); a goal of $100 billion has been set for 2015.
Considering that, China's pushiness at the border is hard to understand. To be sure, tensions have frequently flared along the 4,057 kilometre border, where there was a war in 1962. In 2009, for example, China became vocal in its claims to parts of the Indian state of Arunachal Pradesh, a territory it claims is part of Tibet. Still, this spring's Chinese incursion was unexpected, and alarming.
India is not the only neighbour to feel China's muscle-flexing in recent years. After long defining its "core interests" as Taiwan and Tibet, China is now asserting a whole range of territorial claims elsewhere, from Xinjiang to the South China Sea.
Some of these disputes with other countries appear to be resource-related, such as the squabble over the Spratly Islands. Such macho diplomacy is making China's neighbours increasingly nervous, a price the Chinese seem willing to pay to gain control of oil and other resources. But it is puzzling that China risked a wrangle with Indian over a barren, inaccessible scrap of Ladakh.
Whatever China's goals or methods may be in future, bilateral frictions of all kinds are natural in a $66 billion relationship between two important neighbours.
But the interdependence inherent in all that trade should impose, on both governments, a common-sense ability to manage the border, and all other bilateral issues, with prudence and ingenuity.