WASHINGTON — Fighters with the Islamic State fired a shell onto a military base in northern Iraq, home to American and Iraqi troops, that may have contained a chemical agent, military officials said on Wednesday.

The shell did not explode, and the officials said no American or Iraqi troops were injured in the attack.

The soldier who brought the shell in for testing has not shown any blistering in the 24 hours since handling it, said the military officials, who spoke on condition of anonymity because they were not authorized to discuss the situation.

While the unexploded shell initially tested positive for a mustard agent, a second test was negative. Additional tests have been ordered.