The elite serviceman was the third American to be killed in direct combat since a US-led coalition launched a campaign in 2014 to "degrade and destroy" Islamic State and is a measure of its deepening involvement in the conflict.
"It is a combat death, of course, and a very sad loss," US Defense Secretary Ash Carter told reporters during a trip to Germany.
The Islamic State insurgents occupied the town at dawn on May 3 but were driven out later in the day by the peshmerga.
Carter's spokesman, Peter Cook, said the incident took place during an Islamic State attack on a peshmerga position some 3 to 5 km behind the forward line.