IRBIL, Iraq — Acting on word of an “imminent mass execution” by militants, dozens of U.S. special operations troops and Iraqi forces raided a northern Iraqi compound Thursday, freeing about 70 Iraqi prisoners in an operation that saw the first American killed in combat in the country since the U.S. campaign against the Islamic State began in 2014, officials said.

The raiders killed and captured a number of militants and recovered what the Pentagon called a trove of valuable intelligence about the organization.

The U.S. service member who died was not publicly identified pending notification of relatives. Officials said this was the first American combat death in Iraq since the U.S. began its counter-IS military campaign in August 2014.

Pentagon press secretary Peter Cook said the target of the raid was a prison near the town of Hawija and that the raid was undertaken at the request of the Kurdish Regional Government, the semi-autonomous body that governs the Kurdish region of northern Iraq. He said U.S. special operations forces supported what he called an Iraqi peshmerga rescue operation.

The peshmerga are the Kurdish region’s organized militia. The U.S. has worked closely with them in training and advising roles, but this was the first known instance of U.S. ground forces operating alongside Iraqi forces in combat since launching Operation Inherent Resolve last year.