New hope of a peaceful resolution to the Kashmir dispute, which has simmered for 54 years, may yet emerge from the crisis that has brought India and Pakistan to the brink of war.

A major change in Pakistan's policies on Kashmir may foster indigenous moderates within a separatist movement that has come to be dominated by holy warriors - jihadis - who are mostly non-Kashmiri and pursue a pan-Islamic agenda.

This could pave the way towards an effective ceasefire and meaningful talks.

The shift in Pakistan's Kashmir policy began after 11 September. When President Pervez Musharraf decided he would side with the West against the Taliban, he was not only confronting a neighbour, he was also taking on a vocal religious minority in his own country which had been the backbone of pro-Pakistan forces fighting Indian rule inside Kashmir.

The events of 13 December - when a suicide squad attacked the Indian Parliament in New Delhi - height ened the problem of squaring support for the anti-Taliban coalition with the activities of Islamic extremist groups operating in Kashmir. As Musharraf was trying to curb forces vehemently opposing his anti-Taliban policy, he could hardly allow them a role in what he calls his 'Kashmir cause'.

The result is likely to be a new focus on the 'freedom struggle of the Kashmiris' rather than a 'jihad against India'. This will mean strengthening of the moderate leadership in the All Parties Hurriyat Conference (a conglomerate of 23 Kashmiri separatist parties). They have been sidelined because all their political moves have been checkmated by the jihadi violence.

Kashmir's decade-old armed separatist movement was initially entirely Kashmiri in composition. Even those groups advocating merger with Pakistan demanded self-determination for the state.

Its complexion changed in 1995 when many non-Kashmiri militants were pushed into the valley. Members of Pakistan-based jihadi groups, the Harkat-ul-Mujahideen, Lashkar-e-Taiba and Jaish-e-Mohamed, led suicide missions that sustained a collapsing indigenous movement committed to violence.

The militants' agenda transcended the demand for self-determination. Kashmir became a battleground for pan-Islamic struggle.

The forces that created the radical Islamic Taliban regime in Afghanistan also contributed to the persistent violence in Kashmir.

Thus, Jaish-e-Mohamed, the group accused of the 13 December attack, shares with the Taliban an umbilical cord to Jamiat-e-Ulemai Islam, Pakistan, an Islamist party led by the clergyman, Moulana Fazlurehman Khalil, who runs a network of religious schools said to have nurtured the Taliban.

As the jihadis grew stronger inside Kashmir, they enforced their own social agenda, adopting a strict Islamic code.

After 13 December, Pakistan cracked down on both Lashkar-e-Taiba and Jaish-e-Mohamed. If Musharraf stops them operating freely in Kashmir, it will reduce the intensity of violence.

There are also indications that Musharraf's regime will extend its support to pro-independence secular forces which enjoy mass support in Kashmir.

The US and Britain have declared Lashkar-e-Taiba and Jaish-e-Mohamed international terrorist organisations. But they remained silent about violent indigenous groups such as Hizbul Mujahideen.

Thus, in a way, the US has conceded Pakistan's demand for a line to be drawn between 'international terrorism' and 'freedom struggle'. This has its implications. Around 1,700 Kashmiri boys were reported to have joined militant ranks in the first quarter of last year and even if Pakistan closes down jihadi groups, the violent movement will survive. India will also lose its strongest argument - that Kashmiri separatist violence is aided from across the border.

The Parliament attack gave India the moral high ground and forced Pakistan into its clampdown. If it now begins talks with separatists, it might ease the situation permanently. Otherwise there will be only temporary relief.

Muzamil Jaleel, a journalist with the Indian Express, is on attachment to The Observer.