BAGHDAD — Two American soldiers were killed while conducting combat operations in Iraq, the United States military said in a statement on Sunday, adding that “initial reports indicate the incident was not due to enemy contact.”

Five other soldiers were wounded, the statement said, without providing further details. It did not identify the soldiers or where in Iraq the casualties occurred.

More than 5,000 American troops are taking part in the war against the Islamic State in Iraq, according to the Pentagon. Most operate within heavily guarded bases, collecting and sharing intelligence with Iraqi forces and providing logistical support.

But as the fighting has evolved over the past three years, more American troops are operating close to the front lines. In addition to the two killed on Sunday, five other American soldiers have been killed in Iraq in the fight against the Islamic State, also known as ISIS, including two in the battle to retake the northern city of Mosul.