U.S Secretary of Defense Ash Carter, center, speaks to the media after he left flowers near the damaged section of the Turkish parliament bombed during the July 15 failed coup, in Ankara, Turkey, Friday, Oct. 21, 2016.

U.S Secretary of Defense Ash Carter, center, speaks to the media after he left flowers near the damaged section of the Turkish parliament bombed during the July 15 failed coup, in Ankara, Turkey, Friday, Oct. 21, 2016. (Adem Altan/Pool/AP)

ANKARA, Turkey — Ankara has agreed in principle to negotiate with Baghdad on the contentious issue of the role of Turkish forces in the battle for Mosul, potentially defusing tensions between the two nations as Iraqi troops advance on the Islamic State-held city, Secretary of Defense Ash Carter said Friday.

Iraq began an offensive Monday to retake Mosul, Iraq’s second largest city, which the Islamic State seized in a lightning offensive in 2014.

The military campaign involves 18,000 Iraqi security forces and 10,000 Kurdish fighters — but not the Turkish forces already in northern Iraq nor any of the Sunni forces that the Turks have been training for the Mosul campaign. The Shiite-led Iraqi government to date has not supported Turkish involvement in the battle and has become increasingly agitated by Ankara’s refusal to withdraw its forces.

It remained unclear what the potential agreement would mean for the Turkish contingent. Turkey has said the forces are necessary to maintain its own border security, but the troops’ continued presence sparked an exchange of angry statements as Baghdad launched the major offensive against the Islamic State group.

Carter met with Turkish Defense Minister Fikri Isik and President Recep Tayyip Erdogan to discuss the broader campaign but also to ease escalating tensions between the two nations over the issue.

“These are two close friends of ours,” Carter said of Iraq and Turkey. “In the case of Turkey, it is a NATO ally, and we want to keep everybody focused on the objective here, which is to defeat (the extremists).”

Carter said Iraq’s sovereignty was one of the principles Ankara agreed on, but that a way forward would also consider Turkey’s interests in having a role in the battle, given its shared border and Sunni ties to Mosul’s population.

Carter said he was “confident” that a solution could be found that addresses “the sensitivities of all the parties.”

“It’s something the Iraqi government will need to agree to, but I think there’s agreement there in principle and now we are down to the practicalities,” Carter said. “I think Iraq understands that Turkey as a member of the (coalition) will play a role in ... operations in Iraq.”

Carter said it still needs to be worked out whether the Turkish troops remain or take part in the Mosul fight, and that he would be discussing the issue with his counterparts in Baghdad.

A senior defense official traveling with Carter told reporters that one possibility could be Turkey providing a nonmilitary role in the Mosul fight.

It was Carter’s first visit to Turkey since military officials attempted a coup in July against Erdogan. Carter paid his respects at a portion of the parliament building that was badly damaged during the fighting.

While Turkey is a member of the coalition fighting the Islamic State, it is also waging its own counterterrorism campaign in both northern Syria and Iraq against some Kurdish groups that it considers a threat to its homeland. Parliament voted last month to allow Turkish forces to remain in Iraq to target Islamic State fighters and any other “terrorist” organizations — which could include some of the same Kurdish forces that the United States has trained to attack Mosul.

Washington is attempting to avoid getting caught in the middle of the dispute, said retired U.S. Marine Corps Col. James Howcroft, a director at the George C. Marshall Center for European and Security Studies, a U.S. government-funded security research center that falls under the defense secretary’s policy office.

“It’s a no-win situation,” said Howcroft, who was not speaking on behalf of the U.S. government. “If we get in the middle of this, we really won’t have significant leverage to have either side do what we want. We will get blamed for whatever comes out bad on this.”

The United States also does not want to alienate Turkey and risk the country pulling away from its NATO allies and becoming more closely aligned with Russia, Howcroft said. But Washington also does not want to jeopardize the momentum that it has helped build with Iraq as that country fights for Mosul, which a senior U.S. defense official described as “the battle for Iraq.”

“Obviously we’ve been urging both sides to tamp down the rhetoric,” the senior defense official said.

Turkey has recently said it wants to establish a “safe zone” in northern Syria in an area that was cleared predominantly by a coalition of U.S.-trained and equipped Syrian Kurds. Turkey’s influence in that zone also could alienate forces that the United States will depend on to advance on Raqqa, the Islamic State group’s de facto capital in Syria.

The Pentagon has repeatedly said it is against a no-fly zone in Syria due to security risks.

Howcroft questioned Turkey’s motivations for keeping its troops in Iraq and wanting support for a “safe zone.”

“Look at where that safe zone is,” Howcroft said. “Is this just a Turkish ploy to get power or stay on territory that the Kurds have already taken or that they feel is at risk to losing to the Kurds?”

Carter’s stop in Turkey was part of a seven-day trip to the Middle East and Europe to discuss operations against the Islamic State group and the future rebuilding effort needed in both Iraq and Syria. Twitter:@TaraCopp

Sign Up for Daily Headlines

Sign up to receive a daily email of today's top military news stories from Stars and Stripes and top news outlets from around the world.

Sign Up Now