Two years ago, when he became the president of Afghanistan, Ashraf Ghani accorded special emphasis on normalising relations with Pakistan. As he went out of the way to seek reconciliation with the Pakistan army, there was much anguish in Delhi’s strategic community.

This week, as Ghani visits India to seek a stronger security partnership, Delhi must avoid any needless elation. Delhi understood the virtues of strategic patience in Afghanistan, two years ago, knowing that the contradictions between Kabul and Rawalpindi are irreconcilable. As the wheel turns full circle now, it must appreciate the value of political prudence and a careful balancing of the emerging strategic opportunities and risks in Afghanistan.

Post-Partition geography has shaped the roles of Pakistan and India in Afghanistan. If a shared border ensures an enduring role for Pakistan, India is a natural partner for Kabul as the “neighbour’s neighbour” — and the “once neighbour”. There is no way that Delhi can trump Rawalpindi’s huge strategic advantages in Afghanistan; nor can Pakistan simply wish away India’s role in its turbulent western neighbourhood.

Reconciliation with Pakistan was a strategic necessity for Ghani when he came to power in September 2014. He understood that no government in Kabul can succeed without a modus vivendi with Pakistan. The 2,500 km open border, the Durand Line, and a large Pashtun population in Pakistan, many of whom share economic links with their kin across the border, have long allowed Rawalpindi to destabilise Afghanistan with impunity. A non-hostile Pakistan remains the key to Afghanistan’s stability.

Given the misperception that his predecessor, Hamid Karzai, had bad relations with Pakistan, Ghani sought to explore ways to improve matters with Rawalpindi. Afghanistan’s Western friends also advised Ghani to make a fresh start with Pakistan. Ghani was not wrong in trying to find a compromise with Pakistan. However, he erred in believing that Pakistan would be open to a reasonable accommodation of Afghanistan’s concerns.

It did not take long for Ghani to figure out that Pakistan was not serious about mutual accommodation or deploying its geopolitical advantage to bring about regional stability. After all, Karzai too had repeatedly tried to work out a compromise with Rawalpindi. Afghanistan’s dilemmas with Pakistan are not different from those of India’s. Much in the manner that all Indian prime ministers have sought normalisation of relations with Pakistan, every leader in Kabul has sought cordial relations with Rawalpindi ? as unsuccessfully as Delhi.

But Afghanistan’s Pakistan problem is larger, more existential and rooted in history. As the successor state to the British Raj in the north western marches of the subcontinent, Pakistan inherited the Durand Line. But it did not inherit the Raj’s role as the dominant external power in Afghanistan. Pakistan has sought to convert Afghanistan into a protectorate. No regime in Kabul — not even the Taliban that benefited from Pakistan army’s support — is willing to turn Afghanistan into Pakistan’s protectorate. Rawalpindi wants a weak and pliable state in Kabul. While Pakistan’s strategic aspiration in Afghanistan is clear, it does not have the power to give shape to it.

Although Afghanistan is much weaker than Pakistan, any attempt by Rawalpindi to dominate Kabul either through military, ethnic or religious means produces consequences that it can’t control. Put simply, Rawalpindi has the ability to disrupt Afghanistan, but does not have the capacity to construct a stable order in Kabul. It’s not surprising that Pakistan’s repeated attempts to dominate Afghanistan have failed.

Most regimes in Kabul, except the Taliban, have turned to India to balance Pakistan. The tyranny of geography and India’s aversion to strategic risk have tended to limit what Delhi could do in Afghanistan. While Delhi readily provided economic assistance in times of peace, it was reluctant to be drawn too deeply into Afghanistan’s unending conflict with Pakistan and provoke Rawalpindi. This hesitation was rooted in the fact that governments in Delhi had privileged normal relations with Pakistan over a larger strategic role in Afghanistan. Prime Minister Narendra Modi, however, appears ready to embark on a bolder course in matters related to Afghanistan. With his attempts to revitalise the peace process with Pakistan unsuccessful and Rawalpindi upping the ante in Kashmir, Modi may have fewer reasons to hold back in Afghanistan. President Ghani’s visit to Delhi comes soon after Modi’s decision to put Pakistan Occupied Kashmir, Gilgit-Baltistan and Balochistan in play last month.

Meanwhile, Rawalpindi is mounting pressure on Kabul by letting the Taliban step up the military offensive inside Afghanistan. Pakistan is also betting that as the West’s commitment to Afghanistan comes under a shadow, China, and possibly Russia, will back Rawalpindi’s renewed effort to dominate Afghanistan. As a new dynamic envelops India’s north western frontiers, Delhi may no longer rely on caution as strategy. Under Modi, taking calculated risks has become a critical element of India’s strategic culture.

This article was originally published in the Indian Express.