Updated

Two American soldiers have been killed and five others wounded while conducting combat operations in Iraq, but reports indicate the incident was not due to enemy contact, the military said Sunday.

It did not identify the soldiers.

Lt. Gen. Stephen Townsend, the commander of U.S. forces battling the Islamic State group in Iraq, said the coalition "sends our deepest condolences to these heroes' families, friends and teammates."

"There are no words to describe the respect I have for you and sorrow I have for your loss," Townsend said. "I hope there is some small solace in knowing their loss has meaning for our country and all the nations of the Coalition as the fallen service members were fighting to defeat a truly evil enemy and to protect our homelands."

More than 5,000 U.S. troops are taking part in the war against IS in Iraq, according the Pentagon. The vast majority operate within heavily guarded bases, collecting and sharing intelligence with Iraqi forces and providing logistical support.

But as the fight has evolved over the past three years, more and more U.S. troops are operating close to the front lines. In addition to the two troops killed Sunday, five other U.S. troops have been killed in Iraq in the fight against IS, including two in the battle to retake the northern city of Mosul.

More than 1,200 Iraqi forces were killed in the battle for Mosul and more than 6,000 wounded, U.S. Defense Secretary Jim Mattis said earlier this month.

Iraq's prime minister declared victory against IS in Mosul in July, and Iraqi forces are now preparing to retake the IS-held town of Tel Afar, to the west.

Fox News' Lucas Tomlinson and the Associated Press contributed to this report.