Two U.S. soldiers who died in northern Iraq on Sunday were killed by an artillery mishap while fighting the Islamic State, according to the Pentagon.

Five other soldiers who were part of the same Army artillery section that was firing on an ISIS mortar site also suffered non-life-threatening injuries in the incident, Pentagon spokesman Col. Rob Manning said. All seven soldiers were evacuated by air and two later died.

There was "no indication" ISIS was responsible for the two deaths and injuries, Manning said.

"Please know that our best wishes are with the families of the two soldiers that died and their fellow service members," he said.

The U.S.-led coalition and Iraqi forces recently liberated Mosul from ISIS and is now looking to push the group from its remaining sanctuaries in the northern part of the country.

Manning said the incident is under investigation and no further details on what caused the mishap were available.