"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, Reuters has reported.
"If it were 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."
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 in turn 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.
"We took the decision upon your request to provide effective aid to the Syrian people in fighting the international terrorists who have unleashed a genuine war against Syria. The Syrian people have been practically alone in putting up resistance and fighting these international terrorists for several years now, and have suffered great losses. Lately though, there have been some major positive results in this fight," Putin said, according to the official website of the Kremlin.
"The attempts by international terrorists to bring whole swathes of territory in the Middle East under their control and destabilize the situation in the region raise legitimate concerns in many countries around the world. This is a matter of concern for Russia too, given that sadly, people from the former Soviet Union, around 4,000 people at least, have taken up arms and are fighting on Syrian territory against the government forces. Of course, we cannot let these people gain combat experience and go through ideological indoctrination and then return to Russia."
"On the question of a settlement in Syria, our position is that positive results in military operations will lay the base for then working out a long-term settlement based on a political process that involves all political forces, ethnic and religious groups. Ultimately, it is the Syrian people alone who must have the deciding voice here," Putin said.
"Syria is Russia's friend and we are ready to make our contribution not only to the military operations and the fight against terrorism, but also to the political process. We would do this, of course, in close contact with the other global powers and with the countries in the region that want to see a peaceful settlement to this conflict."
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.