President Clinton made an urgent plea for India and Pakistan to resume their dialogue over Kashmir yesterday, after Indian security forces waged a gun battle with two militants holed up in an army building in Srinagar, Kashmir's summer capital.

In an address to India's parliament, Mr Clinton ruled out mediating in the dispute over which country should have Kashmir. Only India and Pakistan could work out their difficulties, he said. "I can think of no enduring solution to this problem that can be achieved in any other way."

He would say the same thing to General Pervez Musharraf, Pakistan's military ruler, at their meeting on Saturday, he said.

His remarks came two days after unidentified gunmen killed at least 35 unarmed Sikhs in a Kashmiri village. Soon after that, gunmen stormed the army quarters in Srinagar.

Indian paramilitary troops found themselves bombarding their own building for 24 hours with mortars and machine guns before planting explosives on the roof to dislodge the men. They later recovered two corpses.

India accuses Pakistan of backing such militants, including those who massacred the Sikhs on Monday, saying the aim was to drag the US into the conflict.

In an interview with ABC News, Mr Clinton endorsed India's view in part, saying: "Elements within the Pakistani government supported those engaged in violence in Kashmir."

Pakistan says Indian security forces were behind the Sikh killings, hoping they would discredit the rebel groups trying to wrest Kashmir from Indian control.

Mr Clinton described New Delhi and Washington as "natural allies", but he renewed his call for India to sign the comprehensive test ban treaty on nuclear proliferation. "Most of the world is moving towards the elimination of nuclear weapons. That goal is not achieved if any country in any region moves in the other direction," he said.

Prime Minister Atal Bihari Vajpayee said India's minimum nuclear deterrent was based on a security assessment - India's relationship with its neighbours had been "eroded".

At the Taj Mahal in Agra, Mr Clinton posed with his daughter Chelsea and declared: "I've wanted to come here all my life." Asked if he was awed by the sight, Mr Clinton replied: "How could you not be?"

But he used the Mughal mausoleum - its walls damaged by pollution - as a backdrop to urge greater environmental cooperation between India and the US and tougher action on global warming.

"Pollution has managed to do what 350 years of wars, invasions and natural disasters have failed to do," he said. "It has begun to mar the magnificent walls of the Taj Mahal."

Mr Clinton asked India not to let growth get in the way of preserving the environment. "Give us a chance to work with your scientists to prove you can achieve even greater economic growth and make the environment cleaner."

Emphasising the need to curb greenhouse gases blamed for global warming, he conceded the US bears a heavy responsibility because it is the biggest producer of these gases.

"The United States will never ask India or any other developing country to give up its economic growth in order to reduce pollution," Mr Clinton said.

The president announced $200m (£125m) in grants for clean energy projects in India, as well as the easing of sanctions on enenergy cooperation, which were imposed after India's 1998 nuclear test.