Afghanistan's President Hamid Karzai, left, and India's Prime Minister Manmohan Singh exchange documents after signing a joint statement at Hyderabad House in New Delhi. (B MATHUR/REUTERS)

India signed a significant partnership pact with Afghanistan on Tuesday, agreeing to step up cooperation in counterterrorism operations, training of security forces and trade in a move that has the potential to antagonize Pakistan at a critical juncture in the Afghanistan war.

The agreement, which Afghan President Hamid Karzai signed at the start of a two-day visit to India, also includes measures to boost political and cultural engagement. In addition, India pledged its help in stabilizing Afghanistan as the country battles rising extremist violence and prepares for the withdrawal of U.S.-led troops in 2014.

The pact coincides with a souring of relations between Kabul and Islamabad since Afghan officials bluntly accused Pakistan of supporting recent high-profile attacks in their country. The agreement with Pakistan’s arch-rival in the midst of those recriminations has the potential to further strain relations.

Karzai and Indian Prime Minister Manmohan Singh held detailed discussions on the rise of terrorism in the region, Singh said, but neither leader mentioned Pakistan in their statements, which were read at a news conference.

“Our cooperation with Afghanistan is an open book. We have civilizational links, and we are both here to stay,” Singh said in his statement, adding that the agreement creates “an institutional framework” for future ties. “India will stand by the people of Afghanistan as they prepare to assume the responsibility for their governance and security after the withdrawal of international forces in 2014.”

Karzai, who is making his second visit to the Indian capital this year, said Afghanistan appreciated New Delhi’s “understanding of its difficulties” and added that he was “grateful” for India’s help. The strategic agreement is the first such partnership Kabul has entered into with any country.

“Afghanistan recognizes the danger this region is facing through terrorism and the radicalism that is being used as an instrument of policy against civilians and innocent citizens of our country,” Karzai said.

India and Afghanistan share a mutual suspicion of Pakistan’s role in fomenting recent violence in Afghanistan. The new partnership comes just two weeks after the assassination of former Afghan president and peace envoy Burhanuddin Rabbani. On Sunday, Karzai’s office said the assassin was a Pakistani citizen. Pakistan has rejected the allegation that its intelligence agencies were involved in the killing.

India is the largest regional donor to Afghanistan, having invested more than $2 billion in development and infrastructure projects there. In the past decade, it has conducted limited training of Afghanistan’s police, senior army officers and bureaucrats in Indian institutions. But now it appears to want a greater role in shaping Afghanistan’s security.

“This does not mean that India is going to rush its troops to Afghanistan or ship military equipment,” said Lalit Mansingh, a former Indian diplomat. “It just means that India has entered the sphere so far denied to it. For many years, Western nations wanted India to stay away from Afghanistan because they did not want to upset Pakistan. But that has changed in the last year, since President Barack Obama visited India. They are now openly suggesting that India should be more active. With today’s agreement, India is saying that it will be a guarantor of Afghanistan’s stability after 2014.”

There was no immediate official reaction from Islamabad, but some observers said Karzai appeared intent on thumbing his nose at Pakistan at a particularly low point in their relations.

“I think he is going: ‘Look, I am in trouble. Pakistan is at my throat. I need help. The Americans are not going to stay. . . . How can you help us against Pakistan?’ ” said Rasul Bakhsh Rais, a political science professor at the Lahore University of Management Sciences. Still, he noted, “positive things” are happening on the India-Pakistan front, including unexpectedly warm talks in July.

Karzai and Singh also announced commercial ties in mining, mineral exploration and development of hydrocarbons, including oil and natural gas, and Singh said he will work to improve Afghanistan’s economic integration with India and with South Asia as a whole. Last year, Pakistan and Afghanistan signed a transit-trade agreement that would allow agricultural products from Afghanistan to cross Pakistan into India. But the agreement has yet to yield major changes in trade patterns across the region.

Correspondents Joshua Partlow in Kabul and Karin Brulliard in Islamabad contributed to this report.