Afghanistan's president made a two-day trip to India this week, where New Delhi pledged $1 billion in developmental aid and signed other deals for extraditing criminals and terror suspects. That has raised concerns in India's rival, Pakistan, which has long viewed New Delhi's ties to Afghanistan with suspicion.

Nafees Zekria, spokesman for Pakistan's Foreign Ministry, told VOA Thursday that when two sovereign states establish a close relationship, Pakistan "does not want to comment." However, he warned that "if India uses Afghanistan's soil against Pakistan's interests," Islamabad will not remain silent.

"Afghan soil should not be used against the interests of Pakistan,” Zekria said. “If you look at the past events, we have on a number of occasions raised our concerns that there are elements in Afghanistan who are using the soil of Afghanistan to hurt the interests of Pakistan and to cause instability in Pakistan."

Pakistani soldiers transport rescued school childr FILE - Pakistani soldiers transport rescued schoolchildren from the site of an attack by Taliban gunmen on a school in Peshawar, Dec. 16, 2014. FILE - Pakistani soldiers transport rescued schoolchildren from the site of an attack by Taliban gunmen on a school in Peshawar, Dec. 16, 2014.

Afghanistan has long accused Pakistan of giving safe haven to the Taliban and other militant groups, allowing them to organize attacks back across the border. Pakistani authorities have denied those charges, and have pointed to military offensives in their tribal region as evidence of Islamabad's commitment to fighting militant groups.

"We do not allow our own soil to be used against any country, and we do not like to see any other country's soil to be used against Pakistan," Zekria said. "Pakistan knows and has the capability to defend its interests, defend its territory, and will take all measures to safeguard our interests."

Pakistan and terrorism

Shah Hussian Murtazawi, deputy spokesman for Afghan President Ashraf Ghani, responded to Zekria by telling VOA that instead of focusing on relations between Afghanistan and India, Pakistan should take more action against militants' safe havens.

"If [Pakistan] believes in fighting terrorist groups, instead of thinking which country has presence or [does not] have presence in Afghanistan, Pakistan had better expel safe havens of terrorist groups such as the Haqqani network, al-Qaida, Taliban and the Quetta Shura," said Murtazawi, adding that Pakistan cannot "prescribe to us which country we should have relations with."

FILE - Pakistani security officials examine the si FILE - Pakistani security officials examine the site of a suicide attack in Mardan, Pakistan, Dec. 29, 2015. FILE - Pakistani security officials examine the site of a suicide attack in Mardan, Pakistan, Dec. 29, 2015.

Pakistan says it, too, is a victim of terrorism, a view that U.S. officials endorse.

Richard Olson, the U.S. special representative for Afghanistan and Pakistan, said Thursday that Islamabad has made good progress against terrorist groups such as al-Qaida, but more needs to be done.

"While the progress is laudable, [Pakistan's] struggle with terrorism will not come to an end until it makes a decisive shift in its policy of tolerance toward externally focused groups," Olson told the Senate Foreign Relations Committee.

If Pakistan does not make that sort of "decisive shift," Olson told senators at a Capitol Hill hearing, then the fight against terrorism will not succeed.

"U.S. officials have been very clear with the most senior Pakistani leadership that Pakistan must target all militant groups without discrimination, including those that target Pakistan's neighbors, and close all safe havens," Olson added.

Significance of deal

Afghan and Indian officials described the aid package agreed to this week in New Delhi as intended purely for developmental projects. However, some analysts perceive a greater geopolitical significance.

Nijla Ayubi, an executive board member of the Women's Regional Network, which operates in Afghanistan, Pakistan and India, says "each country has its own political and strategic interests in the region."

"In the past we have seen that Pakistan has used Afghan land against India," she said. "[Thus] there is a possibility that India would use the land of Afghanistan."