India moved its warships away from waters near Pakistan Tuesday as Defense Secretary Donald Rumsfeld arrived with ideas for helping the nuclear-armed neighbors avoid another war over Kashmir.

Still, shelling and small-arms fire killed at least seven people overnight along the disputed province's frontier, and pro-militant groups in Pakistani territory vowed to continue their guerrilla insurgency.

Pakistani President Gen. Pervez Musharraf said the threat of war remained real as long as troops were nose-to-nose on the Kashmir border.

"As long as that capability remains, the situation will remain dangerous," he said.

President Bush said he was pleased by the easing of tensions, "but so long as there's troops massed and people are still hostile toward each other, there's always the threat that something can happen."

The Indian navy recalled its warships to Bombay a day after the government said it would allow Pakistani aircraft to fly over India after a six-month ban.

"Ships of the western fleet, which were patrolling different areas of the north Arabian Sea, have been recalled to their base as per the government decision," navy Cmdr. Rahul Gupta said.

He was not more specific. The western command includes India's only aircraft carrier, several submarines, missile destroyers and multipurpose frigates.

Five other ships from the eastern fleet were withdrawn from near Pakistan but remained on the west coast.

The two rivals reached war footing in December after a deadly attack on India's Parliament that New Delhi blamed on Pakistan and Islamic guerrilla groups based there.

Pakistan denied involvement and announced a crackdown on the groups, but diplomatic, commercial and transportation ties were slashed while 1 million troops gathered along the 1,800-mile frontier from the Arabian Sea to China.

The warships moved near Pakistan after a May 14 militant attack on an Indian army camp in Jammu-Kashmir state in which most of the 34 people killed were soldiers' wives and children.

Rumsfeld's trip is part of an international effort to avert a fourth war between India and Pakistan since their 1947 independence from Britain. Two of the previous wars were over Kashmir, which both countries claim in its entirety.

The defense secretary said he had concrete ideas about "a whole series of things" to help ease tensions, but he would not elaborate.

"We're not going in with a single proposal, nor am I a mediator, as such," he told reporters flying with him from Doha, Qatar, after he visited U.S. troops and government officials in the Persian Gulf region.

Rumsfeld offered a mildly upbeat assessment of the prospects for averting war.

"I cannot say I see a trend line that it's getting better or worse," he said Tuesday. "Both sides have been saying things that are helpful and behaving in a responsible way."

He added, however, that intelligence indicators showed virtually no improvement in the military standoff.

The chief dispute between India and Pakistan is their conflicting claims to Kashmir, where Islamic militants have waged a 12-year fight for the independence of the region or its merger with Muslim Pakistan. The insurgency has killed at least 60,000.

"We are looking for genuine steps from the Indian side, not peripheral and cosmetic steps," Musharraf said Tuesday while visiting the United Arab Emirates. "The genuine step, as I have laid down, is the initiation of a dialogue on the Kashmir dispute, and all other issues."

India Foreign Ministry spokeswoman Nirupama Rao responded, "I believe the Pakistan government should recognize the import of these moves and the fact that these are substantial gestures."

India's government refuses to talk with Pakistan's until it is satisfied that Islamic militants no longer are crossing the Line of Control dividing Kashmir. India accuses Pakistan of financing and training the militants.

International diplomacy hopes to elicit confidence-building measures, starting with Musharraf's assurance — relayed through a U.S. envoy — that he ordered his forces to prevent the crossings.

In Pakistan, however, dozens of militants vowed to defy Musharraf's ban on infiltrating India and demanded Islamabad stop cooperating with Washington in neighboring Afghanistan.

"Jihad in Kashmir will continue," said retired Gen. Mirza Aslam Beg, a former Pakistani army chief.

In Pakistani Kashmir's capital, the leader of the right-wing religious party Jamaat-e-Islami told 10,000 supporters, "We will continue to cross the Line of Control as the struggle for Kashmir's freedom continues."

"We will not allow a weak ruler to sell out on Kashmir," Qazi Hussain Ahmed shouted.

Rumsfeld will meet Wednesday with Indian Prime Minister Atal Bihari Vajpayee and then fly to Pakistan.

Rumsfeld said Musharraf "has made a very firm commitment to everything he can do to limit infiltration across the Line of Control permanently."