Last Friday, Turkey joined the war against the Islamic State (IS), the terrorist-run entity that now controls eastern Syria and western Iraq. After four years of leaving the border open for supplies and recruits to reach IS, the Turkish government sent planes to bomb three IS targets in Syria.
At the same time, Ankara ended a four-year ban on its anti-IS "coalition", allies using the huge Incirlik airbase near the Syrian border. There was rejoicing in Washington, since coalition aircraft (mostly American) will now be much closer to IS targets in Syria, and Turkey will also presumably close its border with Syria at last. But there may be less to this change than meets the eye.
On Saturday, Turkey broke a two-year ceasefire with the PKK, a Kurdish revolutionary group that fought a 30-year war to establish a separate state in the Kurdish-majority southeast of Turkey. In fact, since then Turkey has carried out considerably more air strikes against the PKK than it has against IS.
The Turkish army has even shelled territory controlled by the PYD, the Syrian branch of the PKK, although the PYD has managed to drive IS troops out of most of the Kurdish areas of northern Syria.
So which war is President Recep Tayyip Erdoan really planning to fight, the one against Islamic State or his own private war with the Kurds? And why now?
The only person who knows the answers is Erdoan, and he's not saying. But you can work it out if you try.
Erdoan has spent more than a decade subverting a secular and democratic system and establishing his own unchallengeable power. At first he was responding to real popular demands for equal civil rights for religious people and for an improvement in living standards. He delivered on his promises, and won three successive elections by increasing majorities.
But he reduced the once-free mass media to subservience, undermined the independence of the judiciary, and staged show trials of his opponents. He also allowed his own political associates to engage in massive corruption.
As his power grew, moreover, he began to indulge his obsessions. He is a deeply conservative Sunni Muslim who shares the widespread Sunni belief that Shia Muslims are not just heretics, but heretics whose power is a growing threat.
From the start of the Syrian civil war in 2011, therefore, Erdoan supported the Sunni rebels against the regime of Bashar al Assad, which is dominated by the country's Alawite (Shia) minority — and he didn't much mind if the Sunni rebels were head-cutting extremists like Islamic State or not. That's why the Turkish-Syrian border stayed open, and the coalition didn't get access to Turkish airbases.
At the same time, Erdoan opened peace negotiations with the PKK, because conservative Kurds who voted for his party on religious grounds were an important part of his electoral base. But then his party lost its majority in parliament in last month's election (June 7).
What cost him his majority was the new People's Democratic Party (HDP), which seduced most of his Kurdish voters away. Its liberal, pluralistic, all the things that Erdoan isn't. But conservative Kurds had already got the religious freedoms they wanted, and the HDP was also advocating equal political rights for the Kurdish minority. Of course they switched their votes.
So now, if Erdoan wants to form a coalition government (or even win a new election), he needs the support of the hard right — but they are ultra-nationalists who loathe his willingness to make deals with the Kurds. To win them over, therefore, he has started bombing the PKK.
He might be re-starting a Turkish-Kurdish civil war (the last one killed 40,000 people), but that's a risk he's willing to take. And on the side he has dropped a few bombs on Islamic State to make the Americans happy.
Erdoan's problem with Washington was that it finally had the goods on him. A U.S. Special Forces raid in Syria last May killed Abu Sayyaf, the IS official in charge of selling black-market oil from IS-controlled wells into Turkey. The American troops came away with hundreds of flash drives and documents that proved that Turkish officials were deeply involved in the trade, which has been IS's main source of revenue.
Turkey has now bombed a few IS targets — but if you look at the videos, the Turkish planes are launching missiles at single buildings out in open fields, not exactly where you'd expect IS to have weapons stores and command centres. It's as if the Turkish forces were ordered to hit targets that wouldn't do any real damage. But at least the coalition gets to use Incirlik.
Is Erdoan still in cahoots with IS? Maybe. Is he actively supporting the other big Islamist group, the Nusra Front, which dominates the battle in western Syria? Yes he is, quite openly, and the difference between these two terrorist groups is only skin-deep. So if you're expecting a radical change in the military situation in Syria — don't. Assad is still losing slowly, the Islamist extremists are still winning, and Turkey is still playing a double game.
Gwynne Dyer is an independent journalist whose articles are published in 45 countries.