BAGHDAD — Insurgents from the Islamic State militant group shot down an Iraqi military helicopter on Wednesday near a refinery town, killing two onboard, Iraqi military officials said.

It was the second time in less than a week that the militants had shot down an Iraqi helicopter, raising the stakes for the Iraqi forces and the United States-led coalition fighting the group, which have dominated the sky during a campaign of airstrikes. The American military command began deploying attack helicopters in recent days in its missions against the Islamic State, also known as ISIS or ISIL, putting its pilots at greater risk from ground fire.

Islamic State fighters apparently used a shoulder-fired missile on Wednesday morning to bring down the helicopter, which was on a surveillance mission northeast of Baiji, a town about 120 miles north of Baghdad and the site of the country’s largest oil refinery, officials said. The Associated Press reported that the aircraft was a Bell 407, which is primarily used for surveillance.

The pilot and co-pilot were killed in the attack, said the officials, who spoke on the condition of anonymity because they were not authorized to comment on the record. By early afternoon, rescue teams had still not been able to reach the crash site to recover the bodies, officials said.