Forced after months of hesitation to take decisive action against Islamic State (ISIS) jihadists, Turkey has seized the chance to also attack Kurdish militants in strikes that have put a fragile peace process at risk.
Turkey has been pounding ISIS targets inside Syria since Friday, after blaming the group for a suicide bombing that killed 32 people and in the face of sustained US pressure to take a more aggressive stance against the jihadists.
But Turkey has also expanded the cross-border campaign to target the Kurdistan Workers Party's (PKK) military forces in northern Iraq, its biggest such bombing raids since 2011, following deadly attacks blamed on the Kurdish separatists.
Ankara has lumped both campaigns together into a broad "war on terror," even though the secular PKK and Islamist ISIS are themselves bitterly opposed.
Analysts say the ruling Justice and Development Party (AKP) of President Recep Tayyip Erdogan wants to score points with voters after its disappointing performance in June 7 polls and also prevent Kurds gaining a strong foothold in Syria.
Turkey regards the PKK, which has waged a deadly insurgency in southeast Turkey since 1984, as a terror group and the main Syrian Kurdish group fighting ISIS – the Democratic Union Party (PYD) – as the PKK's Syrian branch.
"The government has equated the PKK with ISIS and, although they are two very different entities, this serves the government's intentions," said Marc Pierini, visiting scholar at Carnegie Europe.
David Romano, Professor of Middle East Politics at Missouri State University, said the chief focus of Turkey's campaign may prove to be the PKK rather than ISIS.
"Ankara thus hits several birds with one stone," said Romano, author of "The Kurdish Nationalist Movement."
With Turkey finally allowing the US to carry out anti-ISIS strikes from its Incirlik airbase, Ankara hopes for a "quid-pro-quo" that will see the United States distance itself from the PKK-linked PYD in Syria, Romano said.
"Revenge for June 7"
Ankara's worst case scenario for Syria would be the realization of the PYD's dream of an autonomous Kurdish region – known as Rojava – on Turkey's doorstep.
The government insists it is perfectly logical to equate ISIS with the PKK, which this week shot dead two Turkish police at home as they slept.
"Though acting with different motivations, the two share similar tactics and goals," Erdogan's spokesman Ibrahim Kalin wrote in the Sabah daily.
The strikes come after June 7 parliamentary elections where the AKP lost its overall majority for the first time since it came to power in 2002 and Erdogan failed to win backing for his ambition to create a presidential system.
Now Turkey is facing the prospect of a volatile coalition or snap polls where the AKP would hope to drastically improve on its vote share of under 41%.
Striking against the PKK – still detested by many Turks – could see AKP pick up more nationalist votes.
"The 'global war on terror narrative' also dilutes the internal political difficulty after the elections," said Pierini. "The temptation of a re-run of the election is very high."
The elections also marked the political breakthrough of the pro-Kurdish Peoples' Democratic Party (HDP), which won 80 seats thanks to support from non-Kurdish voters and wrecked the AKP's hopes of a big majority.
Commentor Cengiz Candar wrote in the Radikal online newspaper that Erdogan wanted to taint the HDP by associating it with the PKK.
"The battle with terror is a pretext. The aim is revenge for June 7," he wrote.
"PKK has its hands full"
But making peace with Turkey's Kurds, who make up an estimated 20% of the population, would be a crowning achievement for the AKP.
Erdogan won praise for implementing cautious reforms for Kurds and in 2013 a formal peace process got underway after secret talks with jailed PKK leader Abdullah Ocalan were revealed.
A fragile ceasefire has been observed since, but this now looks in grave danger after the PKK warned the truce had now lost all meaning.
Two Turkish soldiers were killed Saturday in a car bomb attack the army blamed on the PKK. But while it appears this ceasefire is over, analysts say that the peace process is not yet doomed.
Pierini said that the PKK is a "multiple entity" with three main components – the HDP, Ocalan, and the military leadership in northern Iraq – which do not always operate in harmony.
The PKK will also be wary of playing into the government's hands by allowing Ankara to attach a "'terrorist' label" to it and also has its "hands full" in Syria fighting the jihadists, said Romano.
"I would expect the PKK to try to pull back and not resume the guerilla war against Ankara in earnest," he said.
AFP contributed to this report.