India and Pakistan appeared to pull back from a threatened war yesterday after Islamabad arrested the militant leader alleged to have masterminded the gun attack on New Delhi's parliament that plunged the two nuclear states into their gravest crisis in 30 years.

Under intense diplomatic pressure from Washington and London, both countries held out the prospect of talks between their two leaders at a regional summit in Nepal later this week.

But while tensions have eased and the US president, George Bush, has praised his Pakistani counterpart, relations between the two south Asian neighbours remain poor.

In a new year message written before Pakistan's arrest of its leading Islamist militant, the Indian leader, Atal Bihari Vajpayee, accuses his neigh bour of waging a proxy war by encouraging the militants who stormed parliament on December 13, killing nine Indians. The five attackers also died.

"That the terrorists who stormed the precincts of parliament failed in their core objective ... cannot diminish the diabolical nature of the conspiracy hatched by their mentors across the border," he writes.

And he tells Indians they must "realise that the battle against terrorism will necessarily be a long one".

Such uncompromising words will not please the Pakistani leader, Pervez Musharraf, who bowed to international pressure on Sunday night and arrested Hafiz Mohammed Saeed, who until last week led the hardline Islamist group Lashkar-e-Toiba - alleged to have been one of two Pakistan-based groups behind the attack on the Indian parliament.

But yesterday he received words of support from Mr Bush, currently on holiday at his Texas ranch. "He's cracking down hard," Mr Bush said of General Musharraf. "The fact that he is after terrorists is a good sign." From London, too, came endorsement. The for eign secretary, Jack Straw, telephoned his counterpart in Islamabad to convey congratulations on the arrest.

The Indian foreign minister, Jaswant Singh, also took a more emollient tone than his prime minister, welcoming the arrest as a "step forward in the right direction". He was the one who raised the prospect of talks between Mr Vajpayee and Gen Musharraf at the regional summit in Kathmandu on Friday.

This softening of the Indian position was immediately welcomed across the border in Pakistan. Aziz Ahmed Khan, a foreign ministry spokesman, said: "If there is a move from the Indian side we will certainly welcome it."

The renewed focus on diplomacy raised hopes that India and Pakistan will avoid all-out war. After its parliament was attacked, India deployed additional troops in the disputed frontier area of Kashmir in what was said to be the biggest military buildup since the Indo-Pakistan war of 1971.

Pakistani intelligence forces are suspected of sponsoring two groups - Lashkar-e-Toiba and Jaish-e-Mohammed - which want to see Kashmir prised from the control of India, which refuses to hold the referendum it promised decades ago to let Kashmiris decide on their status.

These are also the two groups alleged by India to have organised the attack on its parliament.

Despite some relaxation in tensions in the past two days, Indian and Pakistani troops continued to exchange fire in Kashmir yesterday, according to reports from the area which said villagers were having to flee their homes. Witnesses said that Indian forces fired mortar bombs into villages in the southern Kotli district of the part of Kashmir which is controlled by Pakistan.

India claimed that one of its soldiers was killed and five were wounded when Pakistani troops opened fire across the line of control marking the disputed frontier in Kashmir.

Pakistan's senior military spokesman, Major-General Rashid Qureshi, told BBC Radio: "If India makes the mistake of launching an attack, air, ground, on anything on the land frontier, or violates the air frontiers of Pakistan, Pakistan will respond in a reciprocal fashion."

But London and Washington were hopeful the two countries would step back.

Tony Blair and George Bush, who have pleaded for restraint, were said to be very encouraged by the arrest of Mr Saeed in Islamabad. He was charged with making inflammatory speeches and inciting people to violence.

In southern Pakistan there were arrests of a further 22 followers of his Lashkar group and of the Jaish-e-Mohammed, whose leader - Maulana Masood Azhar - was picked up last week.

Amid the unprecedented crackdown against militants in Pakistan, India said it had arrested a militant in New Delhi on Sunday night.

The authorities alleged that Mohammed Yunus was carrying an 11lb explosive device, and had confessed that his Lashkar commanders in Pakistan had sent him to trigger the explosives in the Indian capital on New Year's Eve.

India has handed Pakistan a list of 20 suspected militants it would like to see arrested.

Meanwhile, US forces in Afghanistan confirmed yesterday that Pakistan had handed over to them 25 suspected al-Qaida fighters. In all 180 men believed to have been fighters for Osama bin Laden are in US custody.

Admitting they made the mistake of neglecting the Indian sub-continent, London and Washington are planning to launch diplomatic initiatives in the region in the new year.