NEW DELHI — President Trump has pivoted toward India and away from Pakistan. Calling upon India to help in Afghanistan, “especially in the area of economic assistance and development,” Mr. Trump was holding up the prospect of a major Indian presence to goad Pakistan to crack down on the Taliban and deny them sanctuary.

Indian policy makers were pleased with Mr. Trump’s blunt warning to Pakistan to stop “housing the very terrorists that we are fighting,” but Indian officials know the American president is neither measured nor consistent.

India could easily spare tens of thousands of soldiers for Afghanistan from its 1.4 million-strong military. Even as the Pentagon and the NATO-led International Security Assistance Force have scrabbled for troops to fight a resilient Taliban insurgency, the United States has discouraged India from sending troops or weaponry to Afghanistan.

It is because Pakistan insists that if the Taliban are to be persuaded to join peace talks over Afghanistan and the supply lines through Pakistan to the United States forces are not disrupted or stopped, the United States must not allow an Indian security presence in Afghanistan.