WASHINGTON — A member of the American military was killed in Nangarhar Province in Afghanistan on Tuesday while on a mission against Islamic State fighters, the Pentagon said.

Peter Cook, the Pentagon press secretary, said the service member had been killed by an improvised bomb that exploded during a foot patrol. Mr. Cook declined to identify the person or provide the branch of the military in which he or she served, pending notification of family.

He did say that “this was a combat situation.”

No other American or Afghan service members were killed in the explosion.

It was the third death of an American soldier in hostile fire in Afghanistan this year, as the United States military mission there has been reduced to a smaller advisory role.