IN THE recent history of relations between India and Pakistan, it has seemed an immutable law: that any apparent political breakthrough will be followed by a terrorist atrocity in India blamed on agents of the Pakistani state. The bloodiest of these—a murderous assault on Mumbai in 2008—brought a chill that has yet to thaw. And just last July, after India’s prime minister, Narendra Modi, had met his Pakistani counterpart, Nawaz Sharif, at a regional summit in Russia and agreed that their national-security advisers should hold talks, terrorists attacked a police station in the Indian state of Punjab.

The latest turn in this cycle is remarkable both for the drama of the breakthrough and for the daring of the terrorist response. On December 25th Mr Modi, en route from Kabul to Delhi, made an impromptu stopover in Lahore in Pakistan. He dropped in on Mr Sharif, who was celebrating both his own birthday and his granddaughter’s wedding. No Indian prime minister had set foot in Pakistan since 2004, and much hugging, hand-holding and bonhomie ensued. It formed part of a series of diplomatic contacts intended to be followed by the launch of a “comprehensive bilateral dialogue”, with the details to be discussed at a meeting on January 15th in Islamabad, the Pakistani capital, between the two countries’ most senior diplomats.

That meeting is now in jeopardy. On January 2nd six gunmen in Indian army uniforms infiltrated a big Indian air base at Pathankot, near the Pakistani border, again in Punjab. Killing them all took over three days and cost seven Indian soldiers their lives. Indian analysts saw the hands of Pakistan-based Islamist groups with ties to the Inter-Services Intelligence, the ISI, Pakistan’s military spy agency. On January 3rd India suffered another attack, on its consulate in the city of Mazar-e-Sharif in Afghanistan. Again, many Indians blamed groups friendly with the ISI.

The talks this month would in effect resurrect a “composite dialogue” pursued fitfully under Mr Modi’s predecessor, Manmohan Singh. Mr Modi presents himself as a very different sort of statesman from Mr Singh, who was cerebral, bureaucratic and mild-mannered to the point of diffidence. Mr Modi is both a chest-thumping nationalist and a compulsive hugger and hand-holder, whose diplomacy emphasises, quite literally, the personal touch. When in opposition, Mr Modi and his colleagues were fierce critics of Mr Singh’s alleged softness towards Pakistan. But in office he gives the impression of having inherited one of Mr Singh’s foreign-policy ambitions: to go down in history as the leader who made lasting peace with India’s neighbour. Mr Modi has boasted of “engaging Pakistan to try and turn the course of history”. Like Mr Singh, however, he now has to deal with the propensity of parts of the Pakistani state to dabble in terrorism as a way of disrupting talks or of furthering their own agenda. The United Jihad Council, an umbrella for militant groups fighting Indian rule of part of the divided and disputed state of Kashmir, said that it had organised the Pathankot attack. Many commentators were sceptical, blaming instead Jaish-e-Muhammad, a notionally banned Pakistan-based outfit nurtured by the ISI to harass India. It has a history of spectacular attacks, including one on Parliament in Delhi in 2001 that brought India and Pakistan to the brink of war. It was also guilty of the kidnapping and murder in 2002 of Daniel Pearl, an American journalist, and in 2003 even tried to blow up Pervez Musharraf, Pakistan’s military dictator. Yet its leader, Masood Azhar, is a free man. The fact that he and other leaders of terrorist groups are not in detention is proof, to India, of official Pakistani connivance in terrorism against it. It is Pakistan’s army, not Mr Sharif, that sets the country’s foreign and security policy. Yet under its present chief, General Raheel Sharif (no relation to the prime minister), it seems to have realised that it is not India that poses an existential threat to Pakistan; rather the greatest danger stems from the militant groups it has fostered itself to wage proxy wars in Kashmir and Afghanistan. To focus on quelling the Pakistani Taliban, in its strongholds in Pakistan’s western, Afghan borderlands, the army, too, has an interest in peace with India and a stable eastern front. Yet it is hard to imagine that extremists can cook up and execute elaborate plans such as the Pathankot attack without some level of official help. This suggests either that General Sharif is playing a double game, and that the army still wants to prevent rapprochement with India; or, perhaps, that the army and the ISI are internally divided.

Our interactive map demonstrates how the territorial claims of India, Pakistan and China would change the shape of South Asia Now Mr Modi faces a dilemma familiar to Mr Singh and his predecessors. To proceed with talks in the face of such provocations looks weak and may encourage others. Yet conventional military options are limited, and nuclear ones unthinkable. And to call off dialogue gives the terrorists what they want.

Not much to talk about

In fact, initial reactions by Mr Modi and his colleagues to Pathankot were restrained. Mr Modi blamed not Pakistan but “enemies of humanity”. The foreign-secretary talks were not called off at once. Maybe Mr Modi calculated that India had more to gain internationally from appearing accommodating than from acting the victim, and that the domestic political cost would be small—after all, he is known as a “Hindu nationalist” who will not yield to Muslim-majority Pakistan. His political allies still talk about the eventual “unification” of India, Pakistan and Bangladesh. Yet all that is at stake at the moment is, in effect, talks about talks. Mr Modi, with his impeccable patriotic credentials, can make the concessions needed to hold them. But nobody expects issues festering since India’s partition in 1947—notably the status of Indian-administered, Muslim-majority Kashmir, which at times seemed tantalisingly close to resolution under Mr Singh—to be solved soon. Hard as it is, getting back to the table is the easy part.