Iran's Revolutionary Guards on Tuesday denied claims by Turkey that the two countries were planning joint military operations against Kurdish rebels in Iraq.
"We have not planned any operations outside Iran's borders," said a statement from the Guards' regional ground forces headquarters published by the ISNA news agency.
"But as always we will strongly confront any group, team or person who wants to penetrate into Iran's territory for anti-security or terrorist operations," it added.
The statement came a day after Turkish President Recep Tayyip Erdogan said a joint Turkish-Iranian operation against Kurdish militants was "always on the agenda".
A leading Turkish newspaper also claimed Iran made a "surprise proposal" to Ankara to jointly attack Kurdish rebels in northern Iraq during a rare visit by armed forces chief of staff General Mohammad Hossein Bagheri earlier this month.
Turkey has battled the outlawed Kurdistan Workers' Party (PKK) for decades, while the Iranian security forces have also fought its affiliate, the Party of Free Life of Kurdistan (PJAK). Both groups have rear bases in neighbouring Iraq.
Despite denying that specific operations were planned, the Revolutionary Guards did threaten the possibility of cross-border attacks in the future.
"Although Iran has no plan to take widespread operational actions outside its borders, if any terrorist group... aims to take the slightest measure to create insecurity on our borders, they will be faced with our intensive and fierce response, and their remnants will be targeted wherever they are," the statement said.
Erdogan said on Monday that the two countries' military chiefs had discussed how to work against Kurdish militants.
"The work will continue because you know that the PKK terror organisation has a foot in Iran," he said.
"We believe that if the two countries cooperate, we can reach a conclusion in a much shorter period of time."
Tensions between Turkey and Iran -- both of which see themselves as historically powerful regional leaders -- have often been tense, and they currently back opposing sides in the Syrian conflict.
Bagheri's visit -- hailed as the first by an army chief of staff since Iran's 1979 Islamic revolution -- was therefore seen as a key sign of warming ties.
"The actions of Turkey and Iran complement themselves. We reached good agreements to prevent terrorists passing from one side of the border to the other," Bagheri said during the visit.