Turkish Prime Minister Ahmet Davutoglu told Reuters on Wednesday some of the suspects in suicide bombings that killed 97 people in Ankara had spent months in Syria and that they could be linked to Islamic State or to Kurdish militants.
He said Saturday's bombing of an Ankara rally of pro-Kurdish activists and civic groups, the worst attack of its kind in Turkey, was intended to undermine his ruling AK Party at Nov. 1 polls and deny it votes needed to form a majority government.
"We are working on (investigating) two terrorist organizations, Daesh (Islamic State) and PKK, because we have certain evidence regarding the suicide bombers having links with Daesh, but also some linkages with PKK groups," Davutoglu said in an interview in Istanbul.
"Some suspects were in Syria for many months."
He rejected criticism that the authorities had not been robust in rounding up suspected jihadists and described as untrue reports that the father of one of the main Ankara suspects had alerted the authorities about his son's radicalization a year ago and that nothing had been done.
An investigation was under way into whether there had been intelligence and security failures in the run-up to the bombing; but he said Turkey had foiled previous such attacks and that Ankara's police, intelligence and security chiefs had already been removed from their posts.
Pressure has piled on Turkey, not least from NATO allies who see it as a bulwark against Middle East turmoil, to do more to seal its 900 km (560-mile) border with Syria. Foreign and Turkish fighters have taken advantage of the mass passage of refugees to cross to Islamic State-held territory, coming back to threaten attacks in Turkey and further afield.
"We are searching each and every individual and we have prevented other attempts in the past ... Even if you put a soldier every 100 meters you can imagine how difficult it is," Davutoglu said.
He said Turkey was at war not only with Islamic State but also the Kurdistan Workers Party (PKK) and the leftist Revolutionary People's Liberation Army-Front (DHKP-C), which claimed an attack on the U.S. consulate in Istanbul in August.
Turkey had intelligence that PKK and DHKP-C militants had been trained as suicide bombers in northern Iraq and sent to Turkey, Davutoglu said.
"We don't see any difference between Daesh and PKK. They are both criminals, both terrorist organizations attacking Turkey, attacking civilians," he said.
The sheer array of insurgent groups, along with interlinked factions within these groups, highlights the scale of the threat facing Turkey. Turkish leaders, however, have long seen Kurdish rebels as the greatest threat to the fabric of the country, fearing alliance with Syrian and Iraqi allies to form a Kurdish state.
Davutoglu said the Ankara bombing was mounted to thwart efforts by the AK Party founded by President Tayyip Erdogan to regain the overall majority it lost for the first time in 13 years at June polls - partly as a result of the electoral success of the pro-Kurdish Peoples' Democratic Party (HDP).
He said he was confident the bid would fail, with latest polls indicating support of 44-45 percent for the AKP.
That would potentially be enough for it to govern alone, but not enough to carry out constitutional reforms Erdogan seeks to endow his presidency with strong executive powers.
"SERIOUS CONCERN" ON SYRIA
Davutoglu, the architect of Turkey's "zero problems with neighbors" foreign policy, has faced criticism for his strategy in Syria of calling for President Bashar al-Assad to be ousted and his support for Islamist movements in the region following the Arab Spring uprising that toppled four Arab leaders.
He said Turkey had the right to defend itself against growing risks emanating from Syria after Russia's military intervention, which he said if anything showed the weakness of Assad.
Russia has stepped up air strikes in Syria in recent days, announcing on Tuesday it had carried out 88 missions in the previous 24 hours, one of the heaviest days of bombardment of its campaign so far.
Syria's army along with Iranian and Hezbollah allies will soon launch a ground attack supported by Russian air strikes against insurgents in the Aleppo area, which is around 60 km (40 miles) from the Turkish border, two senior regional officials told Reuters on Tuesday.
"As a neighboring country we have serious concerns and we have certain rights ... based on international law to protect our homeland security," Davutoglu said.
"Now there are more risks in Syria than before...these new interventions. But at the end of the day the Syrian people should decide on their own future."
Backed by two weeks of air strikes, the Syrian army and its allies have been fighting insurgents in northern Hama province, and neighboring Idlib and Latakia provinces, trying to reverse rebel gains over the summer which had threatened the coastal heartlands of Assad's Alawite minority.
Assad's foreign opponents appear to be stepping up support for rebel groups in response to the Russian-Iranian move. Rebels say they have plentiful supplies of U.S.-made anti-tank missiles that are helping them hold off ground attacks.
Asked whether Turkey would supply moderate Syrian rebels with weapons to face the Russian-led assault, he said the issue was one for the international community and not Turkey alone.
"This is not our problem only, this is the problem of the international community. It is a shame for the international community not to stop the war crimes of the Syrian regime and not to stop this barbaric Daesh group."
(Additional reporting by Orhan Coskun and Asli Kandemir; editing by Ralph Boulton)