Prime Minister Ahmet Davutoglu rejected accusations Turkey had in the past tacitly supported Islamic State militants operating from Syria and had unwittingly opened the door to a suicide bombing that killed at least 32 people.
The blast on Monday tore through a group of university-aged students from an activist group as they gathered in the border town of Suruc ahead of a planned trip to help rebuild the nearby Syrian Kurdish town of Kobani.
Kobani has come under repeated assault from Islamic State and been a rallying point for Turkey's Kurdish minority, who have been enraged by what they see as the refusal of President Tayyip Erdogan and the ruling AK Party to intervene in a conflict played out within clear sight of Turkish military positions.
Thousands of foreign fighters have crossed through Turkey to join Islamic State over the past few years, fuelling accusations from the government's opponents that it is turning a blind eye.
The United States and other Western allies have also urged Turkey, a NATO member which shares a 900 km (560-mile) border with Syria, to do more to tighten security on the frontier.
"Turkey and AK Party governments have never had any direct or indirect links with any terrorist group and have never showed tolerance to any terrorist group," Davutoglu told reporters in Sanliurfa province, where Suruc is located.
Authorities have carried out a string of raids in recent weeks to arrest Islamic State suspects. They have also blocked more than half a dozen Islamist news websites, prompting one group claiming allegiance to Islamic State to accuse Turkey of persecuting Muslims and declare: "Muslims might retaliate."
Anger among Kurds and their sympathizers has boiled over since the attack at Suruc (pronounced soo-ROOCH).
Many of those killed were young Alevis, a minority community whose faith is a distinct branch of Islam, and who were politicized during anti-government protests in 2013, according to one survivor.
"They were living in more comfortable conditions in Turkey's West but had consciences and wanted to help the people of Kobani," said Akdag, 36, who traveled to Suruc to perform a play for refugees from Kobani. He escaped the bombing unhurt.
"We wanted to bring art, aid, toys. We weren't going to wage war."
The Kurdistan Workers Party (PKK) militant group, which has waged a three-decade insurgency against the Turkish state, said the AKP bore responsibility for the bombing, accusing it of backing Islamic State against Syria's Kurds.
In Istanbul, police fired tear gas and water cannon late on Monday at protesters chanting "Murderer Islamic State, collaborator Erdogan and AKP." At a similar protest in the southern port city of Mersin an attacker opened fire, wounding two people, local media said.
"INHUMANE AND BARBAROUS"
Pro-government media accused the Peoples' Democratic Party (HDP), which draws most of its support from Kurds, of seeking to exploit the Suruc attack by provoking Kurds to take up arms, an accusation its leader Selahattin Demirtas denied.
He told reporters it was "shameful" that his call to tighten security at HDP buildings after the "inhumane and barbarous massacre" had been portrayed as a "call to arms".
"No matter how much they attack, without fuelling hatred and anger against each other, we will cultivate brotherhood and live in peace in this country," Demirtas said ahead of a party meeting in the capital Ankara.
There was a flurry of attacks overnight by Kurdish militants, although there was no immediate evidence they were linked to the bombing.
The Turkish armed forces reported two attacks against its soldiers in the east on Monday night. In Igdir province, PKK militants closed a highway and opened fire on security forces, while in the town of Cizre, masked attackers threw homemade explosives at a barracks and opened fire with rifles.
Separately, gunmen opened fire on a police station in the Sultangazi district of Istanbul early on Tuesday. Nobody was hurt and it was not clear whether there was link to Suruc, although the pro-government Yeni Safak newspaper said a leftist group sympathetic to Kurds had claimed responsibility.
The identity of the Suruc bomber has not yet been revealed but some media reports said a man from the southeastern province of Adiyaman was a prime suspect. Davutoglu said a suspect had been identified and his links were being investigated.