The leader of the Islamic State branch that operates in Afghanistan and Pakistan was killed in an American airstrike on July 26 in eastern Afghanistan, the Pentagon said Friday. It was the United States military’s second killing of an anti-American Islamist militant leader in the region in the past three months.

In a statement, Gordon Trowbridge, a deputy spokesman at the Defense Department, said the targeting of the Islamic State branch leader, Hafiz Saeed Khan, was part of an operation by American and Afghan forces in Nangarhar Province, which borders Pakistan and is regarded as a hotbed of jihadist groups.

Mr. Khan, a former member of the Pakistani Taliban, had been the commander of the Islamic State in the Khorasan, an ancient name for the region that includes Afghanistan and Pakistan.

Mr. Trowbridge’s statement said Mr. Khan had been known to “directly participate in attacks against U.S. and coalition forces, and the actions of his network terrorized Afghans, especially in Nangarhar.”