"A cross-border operation may be included on the agenda after the elections," Recep Tayyip Erdogan said in an interview with NTV television.
"Unless you [the U.S. and Iraq] fulfill your obligations to counter the [separatist] Kurdistan Workers Party (PKK), then we will do it. Exactly what we will do is well known," he said, adding that after the elections, the Iraqi prime minister will visit Turkey to discuss, among other things, mechanisms for dealing with the Kurdish separatists.
Turkish authorities said last month that between 3,500 and 3,800 PKK militants are based in the north of Iraq.
Turkey has beefed up security in the southeast of the country, where Kurdish insurgents have recently stepped up their activities.
Ankara earlier warned about the possibility of moving into northern Iraq to conduct a military operation against PKK militants.
Turkey defended its right to move into neighboring Iraq to destroy separatist bases after a suicide attack, which occurred at a Turkish checkpoint June 4, killed at least eight soldiers and wounded six.
Over 40,000 people have been killed in Turkey since 1984, when the PKK started its fight for an ethnic Kurdish state in the southeast of the country.
Since the 2003 U.S.-led overthrow of Saddam Hussein, Turkish separatist Kurds have received increasing, if unacknowledged, support from those living in the three neighboring provinces of oil-rich northern Iraq, whose population has sought autonomy from Baghdad and where local Peshmerga militia formally took over security functions from U.S. forces earlier this month.
Ethnic Kurds have also been actively driving for autonomy in eastern parts of Syria. The borders between the three countries are still unsecured.