India has begun withdrawing some of its troops from Indian-administered Kashmir as Prime Minister Manmohan Singh began his first visit since taking office.
It remains unclear how many soldiers India plans to pull out
A first unit of about 1,000 soldiers was seen withdrawing from the southern town of Anantnag, witnesses said.
Mr Singh told a rally of 8,000 in Srinagar that India would talk with any Kashmiri groups that shunned violence.
Shortly before his arrival, separatist militants launched an attack near the stadium where he held his rally.
More than 40,000 people have died in the disputed region since the armed insurgency began in 1989.
India and Pakistan have fought two wars over their rival claims to the territory which was split during the creation of Pakistan in 1947.
On arriving in Kashmir, Mr Singh said he had been able to order the troop withdrawal because of the improvement in the security situation in Kashmir.
It remains unclear how many soldiers India plans to pull out. Further withdrawals would depend on reduced militant activity by separatists, Mr Singh said.
In a speech to medical students before the main rally, he said he was "committed to unconditional dialogue
with anyone and everyone in the state who abjures violence".
He added: "We are also committed to a purposeful dialogue with Pakistan to resolve all outstanding issues. The only condition is that territory under control of Pakistan should not be used to promote cross-border terrorism directed against us."
However, the BBC's Altaf Hussain in Srinagar says analysts believe his comments did not represent a fresh initiative to restore the dialogue with separatist leaders that was suspended after the change of government in Delhi in May.
Mr Singh also later ruled out any re-division of Kashmir "along communal lines".
Analysts said this effectively rejected one of Pakistani President Pervez Musharraf's recent proposals that some parts could be divided between the two countries.
From behind a bullet-proof screen at the public rally in Srinagar, Mr Singh also announced a $5bn development package for the region.
Our correspondent says a number of people in the crowd were shouting slogans demanding jobs before peace.
He says many Kashmiris recall a huge economic package promised by prime minister Rajiv Gandhi 20 years ago that never materialised.
The troop withdrawal, announced by India last week, began early on Wednesday.
Brigadier-general of the Srinagar-based 15 Army Corps, JS Kataria, told the Press Trust of India: "The first column of troops moved out of Anantnag at 0800 [0230GMT]."
Troops take away the corpse of a militant in Srinagar
The BBC's Nick Bryant in Srinagar says the withdrawal is a manoeuvre as important diplomatically as it is militarily.
The prime minister says he is taking a risk by pulling troops out of the region, but says it is a calculated one.
The withdrawal has been welcomed by Kashmir Chief Minister Mufti Mohammed Sayeed, who described it as a "big step" towards restoring normality in the state.
Pakistan's foreign ministry spokesman, Masood Khan, also welcomed the move, saying he hoped it would promote respect for human rights in Indian-administered Kashmir.
But the United Jihad Council, an alliance of several militant groups fighting to end Indian rule in Kashmir, dismissed the withdrawal.
Its leader, Syed Salah-ud-Din, said it was an attempt to cover up what he called the repression of Kashmiris by Indian troops.
India is estimated to have between 180,000 to 350,000 soldiers in the state, including paramilitary special forces who would not be affected by the pullout.
India and Pakistan have fought two wars over Kashmir, but since January this year they have embarked on a peace process to try to resolve all their outstanding differences, including those over Kashmir.
The process continues next week when Pakistani Prime Minister Shaukat Aziz makes his first visit to India.
Before Mr Singh's rally on Wednesday, two militants were shot dead after taking up position in a derelict hotel building in Srinagar and exchanging gunfire with the Indian security forces for more than two hours.
Two soldiers and a civilian were also wounded in the attack, a police official told the Associated Press news agency.