President Donald Trump and Indian Prime Minister Narendra Modi shake hands while making statements in the Rose Garden in June. (Jabin Botsford/The Washington Post)

In the midst of President Trump’s speech on Afghanistan — where he pledged to “fight to win” the war that has dragged on for 16 years — he included an unexpected swipe at America’s “natural ally” India.

“We appreciate India's important contributions to stability in Afghanistan,” Trump said. “But India makes billions of dollars in trade from the United States and we want them to help us more with Afghanistan, especially in the area of economic assistance and development.”

Trump’s surprise move linking Afghanistan cooperation to the trade imbalance between the United States and India — about $24 billion last year — would likely introduce an “uneasy dynamic” to the India-U. S. relationship going forward, journalist Ankit Panda wrote in the Diplomat.

Suhasini Haider, diplomatic affairs editor for the Hindu newspaper, noted in a tweet that if Trump wants India to partner in Afghanistan, “snarky” messages on “making billions of dollars” are not the way to go.

But some experts said it was not a surprising detour for Trump, a businessman whose erratic foreign policy is often couched in transactional terms.

Some in Afghanistan and India praised President Trump's Aug. 21 speech, but his rhetoric set off alarm bells in Pakistan. (The Washington Post)

India has given $3 billion in assistance to the war-torn nation since its Taliban government was toppled by coalition forces in 2001. And over the years India, Afghanistan’s biggest regional donor, has built more than 2,500 miles of roads, dams, hydropower plants and the country’s new parliament building, Afghanistan’s ambassador to New Delhi, Shaida Abdali, noted in a speech earlier this year.

But Indian officials surely liked one aspect of Trump’s speech: his denunciation of India’s archrival Pakistan and its support for “terrorists” and “agents of chaos.”

India’s Ministry of External Affairs said in a statement India welcomes Trump’s efforts to confront the issues of “safe havens” and “cross-border support” for militant factions, and said it will continue its efforts to extend reconstruction and development assistance to Afghanistan.

Relations between India and the United States have grown closer in recent years, but the Trump administration’s posture on India remains a question mark for many. He had a warm meeting with Prime Minister Narendra Modi in June, and in August the two spoke by telephone and agreed to expand diplomatic dialogue.

The following day, the State Department designated Hizbul Mujahideen, a militant group operating in Indian-administered Kashmir, to be a foreign terrorist organization.

U.S. officials prodding India for more help in Afghanistan predates the Trump administration. Last year, Gen. John Nicholson, the U.S. commander in Afghanistan, urged the Indian government to provide more military support to Afghanistan beyond four helicopter gunships already allocated.

University of Chicago political scientist Paul Staniland said in a tweet that Trump’s speech would not change much in South Asia and that India and Pakistan are “huge countries with their own resources and interests” that “don't take U.S. dictation.” Afghanistan, he predicted, will continue to drift along.