THE ambush came a few hundred metres behind the Indian line of control, in Poonch, part of Indian-run Jammu and Kashmir. Just after midnight on August 6th, an Indian army patrol of six soldiers left its forward base and was confronted by around 20 men, some reportedly in Pakistani army uniforms. Within 15 minutes the assailants had shot dead five of the soldiers and injured the sixth.

These are far from the first killings along the disputed 740-kilometre (460-mile) frontier, much of it fenced and laid with mines, that separates Indian- from Pakistani-controlled land. As recently as January, the killing of two Indian soldiers—one of whom was beheaded—provoked intense public anger. Then, as now, the clash was followed by several days of exchanging rifle and mortar fire as both sides violated a ceasefire agreement signed in 2003.

Until this year, fatalities along the line of control had been steadily falling for a decade. The timing of the latest attack is noteworthy. The prime ministers of Pakistan and India are due to meet next month on the fringes of the UN General Assembly in New York. The assailants perhaps hoped to prevent that meeting. Nawaz Sharif of Pakistan was elected in May promising friendlier relations across the border. During an earlier spell in charge, in 1999, he struck a bilateral deal with India, the Lahore Declaration.

Manmohan Singh, his Indian counterpart, is also keen on better relations. Anxious not to raise tensions after the latest attack, his government at first did not blame Pakistan’s army for it. A.K. Antony, the defence minister, called the assailants “terrorists along with persons dressed in Pakistan army uniform”. It took an uproar in the Indian parliament before he named the army directly.

Mr Singh himself kept silent for over a week, hoping that public anger would pass. Retired generals, who populate India’s television talk shows, along with the opposition Bharatiya Janata Party (BJP), have shown no such restraint, lambasting both Pakistan and the Indian government. On August 12th a group of former soldiers and civil servants called on Mr Singh to refuse to meet Pakistan’s prime minister. Narendra Modi, the BJP’s de facto leader, accused Mr Singh of being “soft” on the neighbour. Perhaps all this is just what the attackers in Poonch wanted.

In Pakistan, the public reaction to the border incident has been muted. Even critics of Pakistan’s army do not think its soldiers were involved in the assault, instead blaming terrorists. Militants routinely wear army or police uniforms when attacking domestic targets. Much the same might happen along the border. Moreover, the belief is growing that the Pakistani army, long obsessed with a supposed India threat, now understands that home-grown militancy, as well as the instability that Afghanistan brings to Pakistan, are the more pressing issues.

A former Pakistani high commissioner to Delhi, Aziz Ahmed Khan, goes further. He claims that the army has been “on board” for years with the idea of normalising relations with India. It has no wish to strike Indians, or let militants do so, he says. Indian sceptics retort that some army connivance must be behind the latest attack. How else could the militants have crossed from and returned to Pakistan?

Even if the two prime ministers do meet, the violence reduces the chances that they will make much progress. Some advisers are urging Mr Sharif not to rush. India has a looming general election, due by May. The advisers have told Mr Sharif that Indian interlocutors cannot risk being seen to make concessions to Pakistan.

In the longer term, Stephen Cohen of the Brookings Institution in Washington, who has just written a book about India and Pakistan, is gloomy about the relationship. He predicts decades of trouble—“a series of crises punctuated by apathy”—whatever the good intentions of elected leaders. Islamists in Pakistan and recalcitrant bureaucrats on both sides have, in effect, a veto over peace efforts.

Yet he and other analysts also acknowledge growing strategic reasons for India to want normal ties. More instability in nuclear-armed Pakistan, or the rise there of an aggressively Islamist government, would be serious threats. In that light, dealing now with civilian leaders in Pakistan makes sense. India also has long-term ambitions to trade by land with Central Asia and Europe, and to check the influence of China in the neighbourhood. Both aims require settling first with Pakistan.