Turkish officials said about 100 fighters from the PKK mounted simultaneous attacks under cover of darkness on seven remote army outposts in Hakkari province, on Turkey's rugged southeastern border with Iraq.
The PKK, which is fighting from bases in Northern Iraq, confirmed it carried out the attacks, in which it said five terrorists died.
The fighting, in which Turkey said it killed 15 terrorists, threatened wider instability at a time of upheaval in nearby Syria and the imminent withdrawal of U.S. forces from Iraq.
Turkish security sources said commandos pushed up to 8 km into Iraq in pursuit of terrorists and aircraft struck targets around a PKK camp on the Zab river.
Backed by his NATO allies, who condemned the attacks as an act of terrorism, Turkish President Abdullah Gül said: "No one should forget this: those that inflict this pain on us will endure far greater pain; those that think they will weaken our state with these attacks or think they will bring our state into line, they will see that the revenge for these attacks will be very great and they will endure it many times over."
Twenty-four soldiers were killed and 18 wounded in the surprise attacks, Prime Minister Tayyip Erdoğan said at a televised news conference in which he said wide-ranging operations, including hot pursuit missions, had been launched.
Turkish media had earlier put the death toll at 26.
Erdoğan cancelled a foreign trip had been about to start and convened an emergency meeting with the interior and defense ministers, along with intelligence chiefs and top generals. The foreign minister also cancelled a planned visit abroad.
Turkish security officials told Reuters Turkish troops had killed 15 terrorists in subsequent clashes. Helicopter gunships struck some targets in the area, and there were some 500 troops on Iraqi soil, some of them ferried in by air.
Iraqi officials in Baghdad say it is difficult for them to control the rugged area where PKK terrorists have their camps and Turkish, Iraqi and U.S. officials meet regularly in Northern Iraq to discuss security and the border concerns.
Ankara's recent step up in attacks on the PKK have fuelled concern in Baghdad that Ankara is pushing its influence south, toward rich oil deposits around the Iraqi city of Kirkuk, just as the U.S. forces which overthrew Saddam prepare to leave.
For NATO, in which Turkey has the biggest armed forces behind the United States, Secretary-General Anders Fogh Rasmussen said: "I condemn in the strongest possible terms the recent attacks ... which killed and injured several Turkish soldiers, policemen and civilians, including a child.
"There is no justification for such acts of violence ... NATO Allies stand in solidarity in the fight against terrorism."
The attack and Turkey's response could increase regional instability at a time when U.S. troops in Iraq are due to pull out by the end of this year and amid mounting violence in Syria, where President Bashar al-Assad has launched a crackdown on protesters challenging his rule.
Tensions between Turkey and Iran also are on the rise over Turkey's decision to house a NATO anti-missile radar.
Ethnic Kurds live in an area that sprawls across the borders of Iran, Iraq, Turkey and Syria.
Turkey, which has frequently accused Iraq of not doing enough to crack down on PKK bases, has launched air and ground operations across the border several times in the past.
The last major land incursion was in 2008, when it sent in 10,000 troops backed by air power. But speculation had been rife that a new cross-border offensive was on the cards.
The attacks came after the jailed leader of the PKK, Abdullah Öcalan, had said that a resumption of peace talks depended on Turkey's attitude. Öcalan sent a message though his brother after a meeting in his cell on a prison island south of Istanbul, the PKK said in a statement on Tuesday.
"At this stage, the key is in the hands of state authorities, not ours. Negotiations will continue and everything could change in the coming process if they open the door," Öcalan said in his first message in months.
Erdoğan's AK Party government has passed cultural and political reforms favoring ethnic Kurds and aimed at ending a violence fed by Kurdish grievances. Breaking a long-held taboo, Erdoğan's government also held secret talks with Öcalan.
But following escalating violence in which PKK terrorists have killed more than 50 Turkish security personnel since July, the government has taken a harder line.
In the past week, Turkish media have carried reports that Iran had captured the second in command of the PKK, Murat Karayilan, only to release him after Turkish airstrikes on the base where the militant commander had been operating from.
Iran has also been battling terrorists on its border with Iraq, and Kurds in Syria, which had harboured Öcalan until 1998 when Turkey threatened Damascus with war, hold long-standing grievances against Assad.