Pakistan has a way of making its presence felt in India's foreign policy and national security matrix that, much to New Delhi's chagrin, tends to steal India's diplomatic thunder.

At a time when Prime Minister Narendra Modi was trying to project himself as a global statesman with a successful visit to Japan and to Gujarat — followed by a visit to Delhi by the Chinese president — and a "rock star" reception in the United States, Pakistan decided it must get some attention.

So the Pakistani Army did what it does best. It escalated tensions along the border in an attempt to ratchet up pressure on India. It started with unprovoked mortar shelling on forward Indian positions along the Line of Control, and over the next few days, the firing spread to the international border and intensified.

Accusing India of "deliberate and unprovoked violations of the cease-fire agreement and cross-border firing," Pakistan promptly shot off a letter to the U.N. secretary general asking for an intervention by the United Nations Military Observer Group in India and Pakistan, a body for which India sees little need since the signing of the 1972 Simla Pact.

The U.N. decided to ignore Pakistani shenanigans and has merely reiterated that India and Pakistan need to resolve all differences through dialogue to find a long-term solution to the dispute.

Meanwhile, Pakistan's powerful Army Chief Gen. Raheel Sharif has suggested that the resolution of the Kashmir issue is imperative for establishing sustainable peace in the region.

Addressing a parade at the Military Academy in Kakul, Sharif said the people of Kashmir should be allowed to decide their fate in consideration of the U.N. resolutions. Not to be outdone, Pakistan People's Party chief Bialwal Bhutto has vowed to wrest Kashmir from India.

"When I raise Kashmir, the entire Hindustan screams. They know when a Bhutto speaks, they (Indians) have no answer," the 26-year-old Bhutto scion said to thundering applause during his first public rally in Karachi last week.

Pakistan is facing multiple crises. Its global isolation is increasing by the day. U.S. forces are withdrawing from Afghanistan starting in December, and Beijing is increasingly dissatisfied with Islamabad's attempts to control the flow of Islamist extremists into its restless Xinjiang province.

Tensions are rising also on Pakistan's borders with Iran where Pakistani Sunni extremists are targeting Iranian border posts, forcing Iranian policymakers to suggest that if Pakistani authorities "cannot control the common border, they should tell us so that we ourselves can take action."

And the new government in Afghanistan under Ashraf Ghani is likely to go even further in developing close ties with New Delhi.

Within Pakistan, Imran Khan is breathing down Prime Minister Nawaz Sharif's neck, and the Pakistan Army's struggle against the domestic Taliban seems to be going nowhere. All this is happening when there is renewed confidence in India about its future as a major global player under the Modi government and when the world is ready to look at the Indian story afresh.

No wonder the Pakistani security establishment is nervous about its growing irrelevance. So once again the Kashmir issue becomes a rallying cry.

As tensions escalated in recent weeks along the border, the Modi government has made clear to Pakistan that Indian forces would "make the costs of adventurism unaffordable."

This has given the Indian military much-needed operational space to carve out a response that has been swift, sharp and effective. Together, the Indian government and the nation's military have underlined the costs of Pakistan's dangerous escalatory tactics by targeting massive attacks on Pakistani Ranger posts along the border. But this won't be enough as the Modi government needs a long-term plan to handle Pakistan.

Pakistan has a revisionist agenda and would like to change the status quo in Kashmir while India would like the very opposite. India hopes that negotiations with Pakistan will ratify the existing territorial status quo in Kashmir. At their foundation, these are irreconcilable differences and no confidence-building measure is likely to alter this situation.

India's premise largely has been that the peace process will persuade Pakistan to cease supporting and sending extremists into India and start building good neighborly ties.

Pakistan, in contrast, has viewed the process as a means to nudge India to make progress on Kashmir, a euphemism for Indian concessions.

The debate in India about Pakistan has long ceased to be substantive. The choice that India has is not between talking and sulking.

Pakistan has continued to manage the façade of talks with India even as its support for separatism and extremism in India continues unabated. India should continue to talk (there is nothing to lose in having a low-level diplomatic engagement after all) even as it considers unleashing other arrows in its quiver to manage Pakistan.

Smart policy for India means not being stuck between the talking/not talking binary. It's not the talking that matters but rather under whose terms. After years of ceding the initiative to Pakistan, it is now for India to dictate the terms for negotiations.

Pakistan's India obsession is not about Kashmir. The very manner in which Pakistan defines its identity makes it almost impossible that India will ever be able to find a modus vivendi with Islamabad. New Delhi should be ready to face this hard reality.

The Modi government is gradually resetting the terms of engagement with Pakistan with regard to Kashmir. It remains to be seen if it will succeed where its predecessors failed.

Harsh V. Pant is a professor of international relations at King's College London, and an adjunct fellow with the Wadhwani Chair in the U.S.-India Policy Studies at the Center for Strategic and International Studies in Washington. His research focuses on Asian security.