As the Indian public discourse on China continues to oscillate between unmitigated romanticism and unreasonable hostility, Prime Minister Narendra Modi has settled down to a pragmatic engagement with Beijing. The NDA government’s three-way dialogue with the Chinese leadership next week, involving External Affairs Minister Sushma Swaraj, Defence Minister Manohar Parrikar and National Security Advisor Ajit Doval, is likely to reflect some of this new realism.

The UPA government led by Prime Minister Manmohan Singh struggled to overcome many of the traditional weaknesses of India’s China policy — the temptation to mask real differences, hide deep resentments in soaring rhetoric on friendship, pretend great convergence on global issues, and resist the natural expansion of India’s economic cooperation with China.

Modi has begun to turn this policy on its head. Delhi now acknowledges the enduring contradictions between the interests of the two countries at the bilateral, regional and global level, seeks to manage those responsibly, refuses to limit its relationship with other countries by looking over its shoulder at Beijing, and rolls out the red carpet for Chinese capital.

If the UPA believed a solution was at hand after multiple rounds of negotiations, the NDA government is quite sceptical. Modi is conscious that China’s rise over the last three decades put Beijing in a higher league than Delhi. He is aware that China is under no compulsion to make the kind of territorial concessions that India would need to to make a boundary settlement work.

Delhi also knows there is greater prospect for tension as India begins to match the Chinese modernisation of infrastructure on the long and contested border. Modi is, therefore, building on the mechanisms devised during the UPA years for better management of the border. The frequency and intensity of border incursions appear to have come down since President Xi Jinping visited India in September 2014.

Delhi is also conscious of the need to manage the broader impact of China’s rise on the subcontinent as a whole. There is sufficient realism in Delhi to recognise that India can’t build a Great Wall against China’s growing economic penetration into the subcontinent. After all, China is the world’s second-largest economy, the subcontinent’s neighbour. If India itself is more open to Chinese investments, it can hardly object to deepening economic links between the rest of the subcontinent and China. This sobering recognition has shaped India’s response to China’s grand “Belt and Road” initiative, which is moving massive amounts of Chinese capital into the subcontinent and improving overland and maritime connectivity with South Asia.

While the accusations from Rawalpindi that Delhi is “actively sabotaging” the China-Pakistan Economic Corridor may be a reflection of General Raheel Sharif’s paranoia, Delhi has certainly objected to Chinese investments in Pakistan-Occupied Kashmir. After all, China does the same, objecting to economic investments in India’s Arunachal Pradesh that it claims is part of China. But India has not opposed other elements of the Belt and Road initiative — for example, the so-called BCIM corridor that seeks to connect southwestern China with Myanmar, Bangladesh and eastern India.

For Delhi, the real challenge is not about taking a “diplomatic position” on the Belt and Road initiative. It is about getting India’s own act together on building infrastructure projects on and beyond its borders. It has no option but to compete with China for economic influence in South Asia and the Indian Ocean region. The Modi government is finally taking some steps in that direction. Delhi is also now ready to work with other countries, especially Japan and the US, to offer alternatives to China’s regional connectivity projects.

For India, the challenge is more demanding in the security domain. Over the decades, India has neglected the development of defence diplomacy with its neighbouring countries, ceding much space to China. What began as Beijing’s special relationship with Pakistan now extends to all of India’s neighbours. China’s arms and influence are seeping all across the subcontinent.

For Delhi, the answer can’t lie in objecting to China’s security cooperation with smaller neighbours. It must be more sensitive to the political concerns of the South Asian nations and offer attractive terms for military partnerships. Modi has lent greater energy and intensity to some of the regional security initiatives unveiled by the UPA government.

The Modi government’s most important departure from the past is in the framing of the China question itself. In the security domain, Modi is betting that creating strategic leverage is more effective than meekly deferring to presumed Chinese opposition to India’s relations with third countries. If the UPA government consciously limited its defence cooperation with the US for fear of upsetting China, Modi’s wager is that expanded cooperation with Washington and Tokyo could eventually help alter China’s calculus on matters of concern to India, especially Beijing’s all-weather partnership with the Pakistan army.

Modi’s approach is not very different from that of Beijing, which always had a keen appreciation for power politics. Even as he plays geopolitical hardball with China, he woos Chinese investment with unprecedented vigour. The UPA government allowed security considerations to trump practical economic cooperation with Beijing. Modi has calculated that as its economy slows down, China needs reliable foreign destinations for its capital. The prime minister hopes that by raising Chinese economic stakes in India, he might improve Delhi’s overall terms of engagement with Beijing.

All this is very different from the sentimentalism, political posturing and a deeply defensive attitude that long coloured India’s China policy. What we now have, instead, is a self-assured Delhi that is ready to compete with Beijing where it must and cooperate where it can. Although China’s absolute power in relation to India has dramatically risen in the last two decades, Modi is demonstrating that a nimble India has much room for manoeuvre.

This article was originally published in the Indian Express.