ISLAMABAD, Pakistan (AP) _ Calling a peace summit with India ``a good beginning,'' President Pervez Musharraf on Friday urged Pakistan and India to ignore extremists in their search for a settlement to the decades-old dispute over Kashmir.

In his first public comments on the three-day summit that ended Sunday without an accord, Musharraf told a news conference he and Indian Prime Minister Atal Bihari Vajpaye tried their best to reach an agreement. They were so close, he said, that a signing ceremony was scheduled.

Musharraf praised Vajpayee as a statesman and lamented their failure.

``I did say to him that we could together create history'' by resolving Kashmir, said Musharraf, an army general who declared himself president shortly before the summit.

Although a joint declaration was scuttled at the 11th hour _ apparently over wording on Kashmir _ Musharraf said both nations must continue their search for an accord.

``As long as the vast majority of people are with us, we have to be strong enough and bold enough to ignore the extremist minority,'' Musharraf said. ``We have to strengthen the hands of moderates and not extremists.''

Both India and Pakistan lay claim to a united Kashmir, divided between the two countries after British rule of the subcontinent ended in 1947. The dispute has poisoned relations between India and Pakistan and has resulted in two wars.

The addition of nuclear weapons to their arsenals has caused international worries that another confrontation could deteriorate into a nuclear war.

Musharraf said he and Vajpayee were in agreement twice, and a table and two chairs apparently had been set up in a hotel in the Indian city of Agra for the signing ceremony.

But in the end neither side could agree on the wording over Kashmir, with Pakistan wanting it to be the core issue and India wanting it to be one of many questions that required settlement, he said.

``My most vivid impression (in India) was of the people's desire for peace. The biggest hope that I have is that no one can stop this process from moving forward because the people will not allow it to happen. This is my hope,'' Musharraf said.

On Friday, Indian and Pakistani soldiers shelled each other across the disputed Himalayan border in Kashmir, Indian government officials said. It was the first shelling since in the region since fighting in 1999.

India also accuses Pakistan of arming and training militants waging an insurgency in its part of Kashmir. Human rights groups say as many as 60,000 people have died since it began in 1989. Pakistan says its involvement is moral and political.

On Monday, two militant groups, both headquartered in Pakistan, vowed to launch fresh attacks in Indian Kashmir and to take their war outside the disputed territory to Indian government installations throughout the country.

``I am certainly against anything done to disturb the peace in India or any terrorist act of any kind, anywhere in the world,'' Musharraf said of the threats. ``So we reject it and we deplore it.''

But of the battle raging within Indian-ruled Kashmir, Musharraf said it was a ``freedom struggle going on with support all over the world ... and the entire population of Pakistan has an emotional connection to the struggle in Kashmir.''

The next round of talks in the region are expected to be held in Pakistan. Musharraf said Vajpayee and Indian Foreign Minister Jaswant Singh have been invited to Pakistan to continue the dialogue.

``We have made a good beginning and God willing the process will continue,'' he said.