Speaking alongside Erdogan at a joint press conference in Moscow, Russian President Vladimir Putin insisted on a need to eliminate "terrorist" groups in the area, backing the view of Moscow's ally - the government of Syrian President Bashar al-Assad.
Putin said he and Erdogan had agreed on how to handle the situation in Idlib, without elaborating: "We have reached an understanding of how and what we can do together to resolve these issues," he told reporters.
Erdogan did not confirm that any concrete agreement on Idlib had been reached and offered sharp words for the Syrian government. It was "unacceptable that the regime rains death on civilians, from air and land, under the pretext of fighting terrorism," he said.
Erdogan said that since May, after the Syrian attacks started, 500 civilians have been killed and more than 1,200 injured, while "3.5 million Syrians face a new humanitarian disaster."
The Syrian government, supported by Russian air power, began a massive military offensive against rebels in Idlib on April 30. Rebels in north-western Syria launched a counter-attack on Tuesday to stop advances by Syrian forces in Idlib, a war monitor said.
Government forces have been gaining ground in south Idlib and the north countryside of Hama over the past week.
The escalating violence in Idlib has shattered the Turkish-Russian deal, which is the only common ground the two countries have found in Syria's multi-sided conflict.
Turkey backs rebels fighting to oust al-Assad, whose main military backer is Russia.
The Idlib offensive poses a threat to Turkish troops stationed at observation posts. Ankara has 12 observation posts in the region since the Idlib deal was reached and, despite the advance of Syrian forces, said all of its sites would remain in place.
The Syrian regime's "provocations have reached a point of risking the lives of our soldiers in the region," Erdogan said, adding that Turkey reserves the right of "self-defence, particularly along our borders."
Erdogan will chair a trilateral summit between Turkey, Russia and Iran on September 16, a year after the Idlib deal was reached on September 17, 2018.
A day before their meeting, Erdogan said Turkey was ready to send ground troops into northern Syria "very soon" to keep its border safe.
Ankara is simultaneously working with Washington to establish a "safe zone" near its border with Syria, to remove US-backed Syrian Kurdish forces there and stem the flow of refugees into Turkey.
Despite their differences in Syria, Russia and NATO member Turkey have increasingly close defence ties.
Putin and Erdogan held their first meeting on Tuesday at the opening of the MAKS air show in the Moscow region, a biennial showcase of Russia's aerospace industry.
Turkey last month acquired Russia's advanced S-400 missile system, evoking the ire of the US and fellow NATO members.
Parts of the second S-400 battery from Russia arrived in Turkey on Tuesday, and more were due over a one-month period, the Defence Ministry in Ankara said.
The US has suspended Turkey from its F-35 fighter jet programme in reaction to Ankara purchasing Russia's S-400s. Washington has repeatedly said that the S-400 and the F-35 are incompatible.
------------------------------------------------------------------------------------------------------------