Relations between Turkey and the Iraqi government have been tense for some time. The most important reason for the tension was the fact that the Iraqi territory has been used by the PKK for a long time. The other reason is that in many parts of Iraq, as we saw in the Mosul region during the fight against Daesh, the Iraqi government is trying to modify the sociological structure of a number of regions.
There is, of course, the crisis around the military base in Bashiqa, as well. Several hundred Turkish troops have been deployed at this base with the authorization of the Iraqi government, which is now asking Ankara to remove them. Turkey says it is not going to call back its troops as long as an Iranian-backed Shiite militia remains active in the region. In other words, the tension between Ankara and Baghdad is also a tension between Turkey and Iran, with the civil war in Syria in the background.
As of today, a truce has been put in place in Syria and diplomatic negotiations are under way to shape the future of the country. The main player at the table will be Russia, which keeps beefing up its influence in the region. The other major player will be the United States, but only when Donald Trump takes his oath and settles into the White House. It suits Vladimir Putin, as well, because Russia does not want to take all the responsibility on this matter and he knows perfectly that Russia has no capacity to control all the dynamics in this volatile region. Iran and Turkey, too, will have a place around the table and these four powers will try to decide what kind of future Syria and Iraq will have.
We do not know yet if the negotiations will succeed. It would be better to sort out a number of differences before sitting around the table, though. For a start, all players may take a step back. Turkey will agree that Assad will remain in power for some more time in Damascus; Iran will stop sabotaging the rapprochement between Baghdad and Ankara and so on. In this context, Turkey may accept to withdraw some of its soldiers from Bashiqa and will make sure that the moderate opposition in Syria will have a say in the upcoming negotiations.
Russia and the U.S., too, will have to find some kind of understanding before starting to discuss the future of Iraq and Syria. It is obvious that Washington will continue supporting the Kurds across the region and Moscow will support the Shiites and the Alawites. This does not mean these two great powers will close their eyes to the demands of the majority populations in the region and count only on those minority groups. This also doesn't mean they will support secessionist movements. This only means they will make sure that these minority populations will have some kind of influence over the decision-making mechanisms in their countries' capitals.
These are of course just guesses. In such a road map, there is no place for organizations like the PKK or the Democratic Union Party (PYD). Maybe that's why Iraq's Haider al-Ibadi keeps saying that the PKK will not be tolerated in Iraq.
If Damascus and Baghdad adopt a firm stance against the PKK/PYD, that will make it easier for Turkey to fight the PKK in its own territory. That will also make it easier for Ankara to heal its relations with Iraq and Syria.
The normalization between Ankara and Baghdad will make life more difficult for the PKK, which benefits from the bad relations between Turkey and its neighbors. This normalization will also help the rapprochement between Baghdad and Irbil. That's why the Turkish prime minister's visit to Iraq was an important diplomatic development, one that heralds good news for the region's future. The two countries are better off when they trust one and other. Their mutual trust will also make them both stronger around the negotiation table.