The jehadi elements in the Pakistan army, who may include the chief, Gen. Raheel Sharif, must be rather unhappy today. Not only have they failed to derail the India-Pakistan talks, there are disturbing signs – for them – that prime minister Nawaz Sharif is serious about improving relations with India unlike his predecessors who mostly paid lip-service to the cause.

As a result, all that the jehadis have been able to achieve via the Pathankot outrage is to put off the foreign secretary-level talks for the time being. But it is clear that both the countries have realized that they can no longer allow the Pakistani military to use the terrorists to sabotage the negotiations.

Another perturbing sign is that America has begun to lean rather too heavily on Pakistan to act against the snakes in its backyard, to use Hillary Clinton’s telling phrase; otherwise it will not supply the F-16s.

But these are not the only worrying portents for the snakes and their charmers. Even more troublesome is Nawaz Sharif’s donning of the secular mantle, which is unprecedented in Pakistan’s recent history. Nawaz Sharif’s visit to Karachi to greet Hindus on the day of Diwali last year, and his comment that he is the prime minister of every community, recall Mohammed Ali Jinnah’s celebrated observation that the state has nothing to do with the faiths of different communities.

At the same time, it is also worth recalling Pakistani historian Ayesha Jalal’s comment in her book, The Struggle for Pakistan, that Jinnah’s speech of August 11, 1947, “stung the budding ideologues of the new state. Steps were taken at their behest to ensure that the governor-general, by now a dying man, was never allowed to speak again without a prepared script”.

Since then, it is the Pakistan army which has been preparing the script for the civilian leaders. Now, suddenly, it looks as if the things are going to change. One possible reason which may not appear crucial at first sight is that the two countries happen to have prime ministers who are overtly business-friendly and believe in creating a pro-market environment which can foster trade and industrial development.

Till now, Pakistan had mostly been under military dictators who had only a marginal interest in trade and industries. India, too, had prime ministers, including Manmohan Singh, whose parties had a socialistic orientation which rarely emphasized this particular aspect of the mutual relations. Instead, they stressed tourism, cricket, cultural exchanges and making borders irrelevant – a project which made considerable headway when Pervez Musharraf was the Pakistan president, as former foreign secretary Muchkund Dubey says in his book, India’s Foreign Policy: Coping with the Changing World.

Narendra Modi’s government, however, wants to pursue what the communists call “neo-liberal” policies with an unabashed capitalist orientation. For such policies to succeed, there is need for prolonged peace. Otherwise, the capitalists – both domestic and foreign – will not invest. Although Modi had said before assuming office that negotiations cannot take place against the sound of gunfire in the background, his decision to invite Nawaz Sharif to his swearing-in ceremony along with the other SAARC heads of state and government, showed that the earlier comment was mere election rhetoric – as was his observation that the illegal Bangladeshi immigrants would have to pack their bags the day after he took charge.

Modi must have decided even while preparing these lines that he will junk them if he won. There were setbacks, of course, to his plans to reach out to Pakistan because of the Pakistani high commissioner’s courting of the Kashmiri separatist leaders in New Delhi and when Gen. Raheel Sharif shot down the Ufa understanding between Modi and Nawaz Sharif for the resumption of dialogue.

Now, these hiccups have been relegated to the past. They were the result of the fact that Modi, being new to the job, did not factor in the high commissioner’s penchant for a powwow with Hurriyat leaders before the official talks just to show that separatism was alive and well. Nor did Modi take into account the Pakistan army’s clout during the Ufa talks.

But the repair work was exemplary. By holding the talks between the national security advisers in Bangkok, away from the Hurriyat, and then sending external affairs minister Sushma Swaraj, who is fluent in Punjabi, to Islamabad to converse with Nawaz Sharif’s mother in her “native” language – apart from the diplomatic tete-a-tete, of course, with the powers-that-be – Modi imparted a fresh momentum to the negotiations with Nawaz Sharif’s assistance.

All this was too much, of course, for Rawalpindi, where the Pakistan army has its headquarters. Hence Pathankot. The use of the lesser known Jaish-e-Mohammed (JeM) was probably necessitated by the fact that the Lashkar-e-Taiba (LeT), its favourite asset, has been too much in the public eye since the Mumbai massacre of November, 2008, to be deployed. The Pakistan army is perhaps holding it back for later.

For the present, however, Rawalpindi will have to rethink its strategy, for Islamabad and New Delhi are seemingly moving in step – for the first time since the dying Jinnah was upstaged – under America’s benign gaze.