He spoke to his ruling AK Party after the Turkish military found bodies of 13 kidnapped Turks in a cave in the Iraqi region of Gara.
"We will stay as long as we need in the places we made secure to avoid similar attacks again," the president was quoted as saying by the Anadolu news agency.
He promised to continue cross-border operations against the outlawed Kurdistan Workers' Party (PKK) and "smash them in their caves."
Turkey accuses PKK fighters of abducting its nationals and launching deadly attacks on border towns. It has been making inroads into Iraq despite objections from the Iraqi government.
The Turkish government has been fighting the PKK - which seeks to secede from Turkey - since the early 1980s. The PKK and Ankara signed a ceasefire agreement in 2013, but it collapsed just two years later after several terror attacks were reportedly committed by PKK militants.
Since the new outbreak of the conflict in 2015, over 1,000 Turkey's servicemen and 500 civilians have died in the PKK's attacks. According to Turkey's defense ministry, the country has neutralized over 10,000 militants of the PKK during this period. Since many PKK bases are located in northern Iraq, Ankara regularly conducts land and air operations in the area.