A U.S. service member was killed in eastern Afghanistan on Tuesday while taking part in operations targeting the Islamic State group, Defense Department officials said.

The service member, whose name and service branch were not immediately released, was killed while on a foot patrol in Nangarhar province with Afghan forces. 

The group had triggered an improvised explosive device, Defense Department spokesman Peter Cook said Tuesday.

The American troops, alongside Afghan forces, were conducting an "offensive action against ISIL because we do not want to let this group be able to take root in Afghanistan as it has in other places," Cook said.

The death is the seventh this year for a U.S. service member in Afghanistan. Operations in Nangarhar are part of an expanded mission targeting Islamic State militants that President Obama authorized earlier this year for the roughly 10,000 U.S. troops in Afghanistan.

In January, Obama gave American personnel legal authority to strike the fledgling ISIS faction under any circumstances. Then in June, Obama approved U.S. airstrikes and combat support for the Afghan army’s offensive operations against the Taliban.

An investigation is being conducted to determine the exact circumstances of the event, according to officials.

"This was a combat situation. Clearly this was a servicemember who faced risk alongside Afghan partners and we offer our condolences to the family," Cook said.