Two Turkish policemen and seven Islamic State suspects were killed in a shootout on Monday that has further rattled the increasingly polarised country just six days ahead of snap elections.
Police are hunting down IS militants after the suicide bombings that killed 102 people at a pro-Kurdish peace rally in the heart of the capital Ankara on October 10, the worst attack in Turkey's modern history.
Monday's gun battle in the main southeastern Kurdish city of Diyarbakir was the first on Turkish soil between security forces and the jihadists since Ankara launched air strikes on IS targets in Syria in July.
Fears of further bloodshed have overshadowed the run-up to Sunday's vote, with an IS cell reportedly plotting major attacks, while Kurdish rebels have taken up arms again after the collapse of the peace process.
A police anti-terrorist squad launched dawn raids on several houses in Diyarbakir where militants were thought to be hiding out.
The suspects opened fire and set off booby trap bombs, killing two police officers and injuring five, according to the Diyarbakir governor's office.
Seven IS militants were killed and 12 arrested after at least two hours of heavy fighting, it said.
- IS cell 'neutralised' -
"This was an important operation... we can say we have neutralised a major Daesh cell," Deputy Prime Minister Numan Kurtulmus told reporters, using an Arabic name for the IS group.
The authorities declared the IS group the number one suspect over the Ankara bombings, but many accuse them of security failings and of turning a blind eye to the jihadists fighting the Damascus regime.
President Recep Tayyip Erdogan himself has vowed to fight all Turkey's "enemies" as his Justice and Development Party (AKP) battles to regain the parliamentary majority it lost in June's election, ending 13 years of single party rule.
He said Monday that Turkey would press on with its operations against "terrorists" before and after Sunday's vote, saying it makes no distinction between the PKK, the Islamic State and the DHKP-C, an outlawed Marxist group that has carried out a number of attacks.
Signup to our newsletter and follow us on Facebook and Twitter!
And he urged voters not to cast their ballots for the pro-Kurdish Peoples' Democratic Party (HDP), which won enough seats in June to wipe out the AKP majority.
"They have the audacity to speak of peace... but that means blood," he said in a veiled reference to the HDP, accused of acting as a PKK accomplice.
- Attack plot feared -
Turkey launched air strikes on IS targets in Syria after a deadly bombing on a border town in July, before turning its fire on PKK rebels based in northern Iraq, triggering a wave of tit-for-tat violence that ended the peace talks with the outlawed Kurdish group.
The government says around 150 members of the security forces have been killed in clashes or in PKK attacks, but there are no confirmed figures for Kurdish militant deaths.
Ankara, which is staunchly opposed to the regime of President Bashar al-Assad, joined the coalition against IS and allowed the United States to use its territory for the air war.
A massive police hunt was also under way at the weekend for a suspected IS cell that included a German woman allegedly plotting to carry out other attacks, Turkish media reported.
The Anatolia news agency said security forces feared they were preparing a major strike "such as hijacking a plane or a vessel or detonating suicide bombs in a crowded location".
Police have been rounding up many suspected jihadists in the past two weeks, including four accused of having a direct role in the Ankara attacks.
Photographs of fake Turkish identity cards allegedly being used by the wanted suspects were published at the weekend by local media, which said the woman was born in Kazakhstan but had a German passport.
One of the identity cards was said to belong to Omer Deniz Dundar, who had previously been identified by the media as one of the two Ankara suicide bombers -- although other reports had suggested the bomber was foreign.
The second bomber was officially identified last week as Yunus Emre Alagoz, brother of the man suspected of carrying out the July attack in the mainly Kurdish town of Suruc which left 34 people dead.