Koppenhafer was killed on Saturday by enemy small arms fire while conducting combat operations in Ninewah province, the DOD said in a statement late on Sunday.
Koppenhafer was assigned to the 2nd Marine Raider Battalion, Marine Forces Special Operations Command (MARSOC), Camp Lejeune, North Carolina.
A statement from Operation Inherent Resolve said the service member was advising and accompanying the ISF during a planned operation. It gave no other details.
According to MARSOC officials, Koppenhafer joined the Marines in 2005 and served a decade as a critical skills operator, the website Military.com said. In that role, he earned numerous valor decorations.
"Our most sincere thoughts are with the family and teammates of Gunnery Sergeant Koppenhafer during this difficult time," MARSOC officials said in a statement.
He is survived by his wife and two children.