India's Prime Minister Manmohan Singh speaks at a session of the Afghan parliament in Kabul on May 13, 2011 as Afghan President Hamid Karzai watches. (Ahmad Masood/AFP/Getty Images)

In a move that doubtless has Pakistan fuming, Indian Prime Minister Manmohan Singh addressed a joint session of the Afghan Parliament today, a rare honor for a foreign dignitary, doubly so since it occurred on Friday, the traditional holy day.

The speech was long on symbolism, short on substance. The prime minister highlighted the historical and cultural ties between the two nations, and called for a “new spirit” in Indian-Afghan relations.

Of course, given the long and bitter enmity between India and Pakistan, Singh could not resist a few muted digs at the troublesome country that lies between Afghanistan and India.

“Terrorism and extremism are alien ideas to our people,” he told the lawmakers. “They bring only death and destruction in their wake … We cannot and must not allow the flames of extremism and terrorism to be fanned once again.”

Afghanistan has long insisted that Pakistan was the center of terrorism in the region, a view that many in the United States are coming to share, following the discovery of Osama bin Laden living in peace and relative comfort in the shadow of Pakistan’s most important military center.

Judging by Singh’s finely tuned speech, India agrees.

But as Kabul and Delhi grow closer, Pakistan is likely to do its best to put spokes in the wheels. The increased security in Kabul during the prime minister’s visit is ample evidence that Afghan security forces were prepared for some sort of reaction. For the past two days many streets have been closed, traffic was hopelessly snarled, additional checkpoints added stress to the morning commute, and an atmosphere of tension reigned in the Afghan capital.

Pakistan has long been suspicious of India’s motives in Afghanistan, and would much prefer to exclude the larger country from any substantive role in what Islamabad sees as its backyard.

Some have viewed Pakistan’s alleged sponsorship of the Taliban in Afghanistan as a way to ensure that Kabul is taking its orders from Islamabad, not Delhi.

But Singh’s charm offensive may have won it some friends in Kabul. He pledged an additional $500 million for social development in Afghanistan, bringing India’s investment in the country to $2 billion.

The prime minister also had some encouraging words for Kabul’s attempts to negotiate with the Taliban, a process that many feel is being hindered by Pakistan’s intransigence.

“Afghanistan has embarked upon a process of national reconciliation. We wish you well in this enterprise,” he said. “Reconciliation” is shorthand for peace negotiations. “It is up to you, as the peoples’ representatives, to make decisions about your country’s future without outside interference or coercion. This is your sovereign right. India will respect the choices you make and the decisions you take.”

His remarks have also been taken by many Afghans as a veiled criticism of U.S. requests for long-term bases in Afghanistan. Apparently few countries in the region welcome the idea of a permanent or extended American presence on their doorstep.

“This is our region and we have to survive together and flourish together,” he said. “While the international community can help, ultimately it is the people of the region who must take charge of their own future. We have to learn to solve our problems ourselves. This is the lesson of history. “

The visit ended on a high note, all smiles and applause. But it is unlikely that Afghanistan and India will be allowed to forge their friendship in peace. In this uncomfortable ménage a trois, Islamabad will almost surely do its best to play the role of the spoiler.

From Kabul to Kandahar and all points across the rugged and unruly country of Afghanistan, U.S. troops and their allies are engaged in an intractable war that's now in its 10th year. Dispatches: Af/Pak is a daily blog that tries to make sense of what's happening on this uneasy ground. Dispatches: Af/Pak also looks at the important role Pakistan plays in the conflict.