Putin made the Syria stopover, the first by a Russian head of state since president Dmitry Medvedev visited in 2010, en route to Egypt, where he met with Egyptian President Abdel Fattah al-Sisi, one of Ankara's prime foes in recent years.
"If the terrorists raise their head again, we will hit them with such strikes as they have never seen", Mr Putin said.
This is the eighth face-to-face meeting between Putin and Erdogan this year, a sign of the intensity of a relationship that had hit rock bottom in November 2015 when Turkey shot down a Russian warplane over Syria.
"I have taken a decision: a significant part of the Russian troop contingent located in Syria is returning home to Russia", he added.
Turkey has supported Syrian opposition groups while Russian Federation has backed Assad.
Russian President Vladimir Putin (2nd-L) and his Syrian counterpart Bashar al-Assad (R) meet and have drinks and snacks with Russian military officers in a hall in the Russian air base in Hmeimim in the northwestern Syrian province of Latakia on December 11, 2017.
Citing unnamed USA officials and independent experts, Reuters reported in late 2015 that Russian Federation had deployed an estimated 4,000 troops to Syria.
Analysts, however, point out that Russian Federation does not want to live again the "Afghanistan trauma" this time in Syria and will push belligerent parties for a viable peace once hostilities end on the ground.
The Kremlin first launched airstrikes in Syria in September 2015 in its biggest Middle East intervention in decades, turning the tide of the conflict in Assad's favor.
Noon.com goes live in Saudi Arabia
Saudi Arabia has announced that it will now issue permits to the commercial theatres, lifting a almost 35-year-old ban on cinema. They argue it makes no sense to ban cinemas when movies today are readily available online. "It's spectacular news.
"So, in that sense, it's realistic that we've finished the military campaign in Syria".
Assad's opponents, Western governments and some human rights organizations alleged that Russian air strikes on Syria had killed large numbers of civilians.
Moscow's casualties have been mounting in Syria as its presence grew from advisers and military contractors to include special forces and an air campaign this autumn, although the exact number of deaths remains secret.
The rebels still control pockets of territory, especially near the country's borders.
Putin added that he hoped Iran and Turkey would be able to restore the peace in the country.
Opinion polls show that he will comfortably win the presidential election, scheduled for March.
Al-Sisi met Putin at Cairo's global airport and the two leaders later went straight to the presidential Ittahidyah palace in Cairo's upscale Heliopolis suburb where talks got underway.
The latest Pentagon announcement echoes a November report from the Defense Department showing US troops in the Middle East have increased 33% in the last four months and now stand at 1,723 in Syria - up from 1,251 in June.