A U.S. service member was killed by an improvised explosive device Tuesday while on foot patrol with Afghan forces engaged in an ongoing offensive against Islamic State fighters, the Pentagon said.

Pentagon officials did not give the service branch of the slain service member and withheld identification and other details until family members could be notified.

The death is the seventh for U.S. service members in Afghanistan this year -- including three in January, one in June and two in August -- and the second this year from an IED, according to the website icasualties.org.

Before Tuesday, 1,832 U.S. service members had been killed in Afghanistan since 2001, according to Defense Department data. U.S. deaths in other areas in support of the Afghan mission bring the total to 2,384.

"This was a combat situation, clearly," Pentagon Press Secretary Peter Cook said at a news conference.

The service member was on a counter-terror mission with Afghan National Defense Security Forces against the Islamic State of Iraq and Syria affiliate known as Islamic State-Khorasan Province (ISKP), which has gained a foothold in eastern Nangarhar province, Cook said.

It was unclear whether the service member set off the IED or it was triggered remotely, but there were no immediate indications that the U.S. service member was specifically targeted, Cook said. There were no other U.S. or Afghan casualties in the incident.

The death "highlights the risk our service members are taking every day" in the fight against ISIS, Cook said.

The death came as other U.S. "enablers" in Afghanistan were partnered with Afghan troops in beating back a coordinated Taliban offensive aimed at retaking the north-central city of Kunduz, he said.

Army Brig. Gen. Charles H. Cleveland, a spokesman for U.S. Forces-Afghanistan, told The New York Times that he could not provide details on the "current disposition of enabler and train, advise and assist forces" in Kunduz because the operation is still underway.

Cleveland said -- and Cook later confirmed -- that there had been at least one action by a U.S. helicopter in dropping off Afghan troops to assist in the defense of the western part of the city.

Afghan officials said the city's center has been cleared of the Taliban and clearing operations are continuing in other sectors. Late last year, a major Taliban offensive briefly took the city but was driven back with the aid of U.S. airstrikes.

The U.S. currently has about 9,500 troops in Afghanistan. President Barack Obama has approved keeping at least 8,400 there through next year.

-- Richard Sisk can be reached at Richard.Sisk@Military.com.