Khamenei tells Erdogan offensive in Syria would be 'detrimental'
Stay tuned with 24 News HD Android App
His statement came shortly before Iran's ultra-conservative President Ebrahim Raisi hosts his Russian and Turkish counterparts for talks on the Syrian conflict.
The Iranian leader called for the issue to be resolved through dialogue between Ankara, Damascus, Moscow and Tehran.
Erdogan arrived in Tehran on Monday night, and Russian President Vladimir Putin is also expected to land in the Iranian capital later for Tuesday's trilateral meeting.
Russia, Turkey and Iran have in recent years met to discuss Syria as part of the "Astana peace process" to end more than 11 years of conflict in the Arab country.
All three are involved in Syria, with Russia and Iran supporting the Damascus regime against its opponents, and Turkey backing rebels.
Turkey has launched waves of attacks on Syria since 2016, targeting Kurdish militias as well as Islamic State group jihadists and forces loyal to Syrian President Bashar al-Assad.
Erdogan's planned military offensive would target Kurdish fighters regarded by Ankara as "terrorists".
They include the US-backed Kurdish People's Protection Units (YPG), which formed a crucial part of an international coalition against IS jihadists in Syria.
Ankara fears a strong Kurdish presence along its border with Syria will embolden the banned Kurdistan Workers' Party, which for decades has been waging an insurgency against the Turkish state that has claimed tens of thousands of lives.
Syria's government has repeatedly condemned Turkish threats to mount a new incursion.