Updated

Two U.S. service members were killed late Thursday and a third was wounded when they came under attack during a raid against Islamic State fighters in southern Nangarhar province, Afghanistan, a Defense Dept. official confirmed to Fox News.

The soldiers were battling ISIS-K in partnership with Afghan defense forces in the same area where the "Mother Of All Bombs" was dropped earlier this month.

ISIS WEAPONS CAPTURED BY CANADIAN WOMAN WORKING TO DISARM TERRORISTS

"The fight against ISIS-K is important for the world, but sadly, it is not without sacrifice," said Gen. John W. Nicholson, Commander, U.S. Forces-Afghanistan. "On behalf of all U.S. Forces and our coalition partners, I offer our deepest sympathies to the families, friends and fellow service members of our fallen comrades."

Next of kin have been notified. In keeping with U.S. miltary policy, the names and of those killed will not be released until 24 hours after next-of-kin notification.

Eighteen ISIS militants were killed in the firefight.

A source with the Afghanistan army told Fox News that ISIS hasn't been considered a major threat in the country, where the local army and U.S. forces have been more focused on routing the Taliban. Still, the U.S. has been battling ISIS in Afghanistan for months and estimates that it now includes about 800 fighters there.

The bombing came just days after a U.S. Army special forces soldier was killed in the region. The bomb is the largest non-nuclear weapon ever used in combat by the U.S., and it killed several dozen militants, U.S. officials said.

Fox News' Jennifer Griffin, Hollie McKay and The Associated Press contributed to this report.