WASHINGTON — Taking a page from Vietnam War propaganda, the American military in Afghanistan has been widely publicizing body counts of Taliban and Islamic State fighters killed in battle. Officials described the practice, which began in January, as part of an apparent strategy to rally White House support for remaining in the conflict.

In roughly three dozen statements, the military announced the deaths or wounding of more than 2,500 enemy fighters. The media releases were posted online, where they could have been seen by at least hundreds of thousands of internet followers, including on Facebook and Twitter.

On Thursday morning, in response to questions from The New York Times, the practice abruptly stopped.

The body counts served as a grisly contrast to other metrics that paint a grimmer reality of the war effort — including high attrition rates in the Afghan military and the loss of territory to Taliban militants.