While Turkish troops backed by fighter jets and helicopter gunships pursued terrorists into Iraq and political leaders vowed to exact "great revenge," religious ceremonies for the dead soldiers were due to be held in the eastern city of Van in what was sure to be a national outpouring of grief and anger.
Underlying outrage at the attack by PKK terrorists and the risk of a backlash against minority Kurds, Turkish flags flew over government buildings and homes in cities across the country and protesters gathered in Istanbul and the capital Ankara to chant slogans against the PKK.
While Turkey's incursion into Iraq appeared to be limited in scope -- Turkish commandos were dropped by helicopters and other troops were in "hot pursuit" up to 8 kilometers across the Iraqi border -- there was alarm at the prospect of a major Turkish offensive in northern Iraq.
With US forces preparing to withdraw from Iraq this year, and Syria and Iran, also home to restive Kurdish minorities, dealing with their own domestic tensions, such an operation might add to regional instability.
Turkey has accused Iraq of not doing enough to crack down on PKK rebels waging a 27-year-old war from bases in Northern Iraq, and Ankara has not ruled out launching another cross-border operation.
Iraqi officials joined US President Barack Obama, Ankara's NATO allies and the European Union in condemning the attack.
But in a sign of deep mistrust, Turkish Foreign Minister Ahmet Davutoğlu told his Iraqi counterpart Hoshiyar Zebari during a phone conversation on Wednesday: "It is not time to condemn, it is time to take concrete steps," according to Turkish officials.
Iraqi officials in Baghdad say it is difficult for them to control the rugged area where PKK terrorists have their camps. Turkish, Iraqi and US officials meet often on security.
Erdoğan, one of the most popular politicians in the Middle East for his championing of Palestinian rights, has been careful not to pin blame on any country but said he expects full cooperation from the international community in the fight against the PKK.
"Whoever provides implicit or open support to terror, whoever nourishes, protects, harbors it, whoever tolerates terror, tries to conceal the bloody face of terror or ignore the inhumane attacks of the terrorist organization, they should all know that the breath of the Turkish Republic state will always be on the back of their neck," he said on Wednesday.
The deaths occurred when 100 PKK terrorists mounted simultaneous ambushes under cover of darkness on remote army outposts in Hakkari province, on Turkey's rugged southeastern border with Iraq, killing 24 soldiers and wounding 18.
Turkey's army, which is NATO's second largest, is a conscript one and most families send young sons to serve.
After attacks like this, nationwide broadcasts of dead soldiers, referred to as "martyrs" by Turkish media and politicians, being laid to rest in flag-draped coffins whip up nationalist passions.
In Ankara, some 400-500 youths gathered in the central Kizilay district waving Turkish flags and chanting slogans such as "Death to the PKK" and hurled insults at Kurdish politicians who entered parliament after June's general elections.
There were similar protests in Istanbul, Turkey's largest city and financial center.
Erdoğan's AK Party government has passed cultural and political reforms favoring ethnic Kurds with the aim of ending the violence fed by Kurdish grievances, and has pledged to work with the opposition, including the Kurdish bloc, to rewrite a constitution that was expected to address Kurdish demands.
But Wednesday's violence might hamper efforts towards reconciliation between Turks and Kurds, who make up 20 percent of the population.
"The attack is also a serious blow to hopes of substantive negotiations between the government and Kurdish nationalists leading to the inclusion of measures to address Kurdish grievances in the draft of a new constitution," said Wolfango Piccoli, an analyst at Eurasia group.
The European Union, which Turkey wants to join, has pushed the Turkish government to grant more rights to the Kurds.
But EU countries have also urged Kurdish lawmakers to distance themselves from the PKK, which is considered a terrorist group by the United States, the EU and Ankara.