It was Assad's first foreign trip since the outbreak of the Syrian crisis in 2011, and came three weeks after Russia launched a campaign of air strikes against Islamist militants in Syria that has also bolstered Assad's forces.
The Kremlin kept the visit quiet until Wednesday morning, broadcasting a meeting between the two men in the Kremlin and releasing a transcript of an exchange they had. It did not say whether the Syrian leader was still in Moscow or had returned home.
Putin said he hoped progress on the military front would be followed by moves toward a political solution in Syria, bolstering Western hopes Moscow will use its increased influence on Damascus to cajole Assad into talking to his opponents.
Iran has also long been a strong Syrian government ally, and the fact that Assad chose to visit Moscow before Tehran is likely to be interpreted in some circles as a sign that Russia has now emerged as Assad's most important foreign friend.
Russian state TV made the meeting its top news item, showing Assad, dressed in a dark suit, talking to Putin, together with the Russian foreign and defense ministers.
The Kremlin has cast its intervention in Syria, its biggest in the Middle East since the 1991 Soviet collapse, as a common sense move designed to roll back 'international terrorism' in the face of what it says is ineffective action from Washington.
It is likely to use Assad's visit to buttress its domestic narrative that its air campaign is just and effective and to underline its assertion that the foray shows it has shaken off the Ukraine crisis to become a serious global player.
"First of all I wanted to express my huge gratitude to the whole leadership of the Russian Federation for the help they are giving Syria," Assad told Putin.
"If it was not for your actions and your decisions the terrorism which is spreading in the region would have swallowed up a much greater area and spread over an even greater territory."
Assad, who looked relaxed, emphasized how Russia was acting according to international law, praising Moscow's political approach to the Syrian crisis which he said had ensured it had not played out according to "a more tragic scenario."
Ultimately, he said, the resolution to the crisis was a political one.
"Terrorism is a real obstacle to a political solution," said Assad. "And of course the whole (Syrian) people want to take part in deciding the fate of their state, and not just the leadership."
Putin said Russia was ready to help find a political solution and hailed the Syrian people for standing up to the militants "almost on their own," saying the Syrian army had notched up serious battlefield success in recent times.