Updated

Two years after nuclear-armed India and Pakistan nearly went to war, their leaders agreed Tuesday to hold landmark peace talks next month on all topics, including the hot-button issue of Kashmir (search) that lies at the heart of their half-century of mutual hatred and mistrust.

"I think the victory is for the world," Pakistan's President Gen. Pervez Musharraf (search) declared, though observers cautioned a lasting peace is far from assured.

Musharraf and Indian Prime Minister Atal Bihari Vajpayee (search) agreed to the talk city of Agra. An attack by Islamic militants on India's Parliament in December 2001 scuttled any hopes and brought the two nations to the brink of a devastating fourth full-scale war — this one with nuclear weapons in play.

In February 1999, hopes were raised briefly after a meeting between Vajpayee and then-Prime Minister Nawaz Sharif (search) of Pakistan. A Pakistani incursion that summer into India's portion of Kashmir doomed those talks, and months later Sharif was overthrown by Musharraf, the military leader who had ordered the incursion.

But observers on both sides said the atmosphere is very different today.

Musharraf has become a staunch U.S. ally since the Sept. 11, 2001, terrorist attacks. His government has banned more than a dozen militant organizations and arrested over 500 Al Qaeda suspects, turning most over to American authorities.

Despite early cynicism about the general's motives, his commitment to cracking down on militant groups seems genuine. Musharraf has survived three assassination attempts, the latest two in December. The last attack, a Christmas Day suicide bombing that killed 16 people, was believed carried out by Jaish-e-Mohammed (search), a Kashmiri militant group.

Kashmiri rebels denounced the news of talks as a sellout, an ominous indication of the challenges ahead.

"The agreement reached by India and Pakistan is a massacre of the Kashmiri cause," said Amanullah Khan, chairman of the Jammu Kashmir Liberation Front (search), which favors independence for the region. "It is not only a U-turn by Pakistan but a betrayal."

Syed Salahuddin, the chief of Hezb-ul Mujahedeen, the main militant group in Indian Kashmir, warned that military operations would continue until India frees jailed militants and proves its sincerity.

"India should declare Kashmir a disputed territory, release Kashmiri leaders from its torture cells and call its troops back to barracks," Salahuddin told The Associated Press from Muzaffarabad, capital of Pakistan's portion of Kashmir. "Unless that happens, the mujahedeen will continue their operations."

The peace deal was sealed in an early morning phone call Tuesday that Vajpayee made to the Pakistani leader, a day after the two met in private for an hour at President's House in Islamabad.

Musharraf said both men were overjoyed and thanked each other for their courage.

"I wished him very good health, and he wished me protection," Musharraf quipped. He hailed his guest for his "vision" and "statesmanship."

Indian Foreign Minister Yashwant Sinha said details, including the location of the talks and the level at which they will be held, were still to be worked out.

A high-ranking Indian official said on condition of anonymity that the talks would revolve around eight points, including Kashmir and two other territorial spats, terrorism, trade and confidence-building measures.

The meetings involving Vajpayee, Musharraf and Pakistani Prime Minister Zafarullah Khan Jamali on Sunday and Monday were the first between Indian and Pakistani leaders in more than two years, and followed months of incremental steps to improve relations.

The two countries have held to a cease-fire between their troops in Kashmir, resumed high-level diplomatic ties and restored transportation links.

But there had been no indication such a breakthrough was possible, and both sides had sought to dampen any expectations ahead of the South Asian Association for Regional Cooperation (search) summit, which concluded Tuesday.

Vajpayee made no comment on the agreement before boarding his plane at Islamabad airport Tuesday, seen off with a hug from Jamali and well-wishes from other Pakistani officials.

Pakistan and India fought wars in 1948, 1965 and 1971 and have engaged in many more deadly skirmishes since the 1947 partition of the subcontinent.

"The people of both countries are for peace and harmony," Musharraf said. "The leadership in both countries has to rise to fulfill the aspirations of their people."