The Islamic State has kept up heavy bombardment of the area around Taza for at least three months. But a local security official, speaking on the condition of anonymity because he was not authorized to brief the news media, said this was the first time a chemical attack on the village was suspected, given the number of people who were ill immediately after the bombardment. He said he believed the attack used chlorine gas, though there was no one to independently confirm that.

The United States has long suspected the Islamic State of using sulfur mustard, a chemical warfare agent, and last year officials said that they confirmed the presence of the mustard gas on fragments of ordnance used in Islamic State attacks in Syria and Iraq. Laboratory tests, which were also performed on scraps of clothing from victims, showed the presence of a partly degraded form of distilled sulfur mustard, an internationally banned substance that burns a victim’s skin, breathing passages and eyes.

Chemical warfare agents, broadly condemned and banned by most nations under international convention, are indiscriminate. They are also difficult to defend against without specialized equipment, which many of the Islamic State’s foes in Iraq and Syria lack. The agents are worrisome as potential terrorist weapons, even though chlorine and blister agents are typically less lethal than bullets, shrapnel or explosives.

It was unclear how the Islamic State obtained sulfur mustard, a banned substance with a narrow chemical warfare application. Both the former government in Iraq of Saddam Hussein and the current government in Syria at one point possessed chemical warfare programs.

Mr. Afari was captured last month by a new Special Operations force made up primarily of Delta Force commandos shortly after they arrived in Iraq. They are the first major American combat force on the ground there since the United States pulled out of the country at the end of 2011.

Two weeks after his capture military officials notified the International Committee of the Red Cross, which monitors the treatment of prisoners, that they were holding an Islamic State fighter. The Red Cross acknowledged in a statement on Tuesday that it had visited Mr. Afari but gave no other information.