Declaring a success in Syria, Vladimir Putin on Monday visited a Russian military air base in the war-ravaged country and announced a partial pullout of his forces.

The Russian president's visit draws a symbolic line under a campaign that has shored up Bashar al-Assad's government. It is also the first visit by a foreign head of state to Syria since the nation’s bloodletting began nearly seven years ago.

His brief stop at the Hemeimeem air base in Syria's coastal province of Latakia while on route to Egypt comes days after the Russian president declared his bid to run for re-election in the March 18 vote, helping encourage the feelings of pride about Russia's revived global clout and prestige.

A Russian Su-24 bomber passes by a portrait of Syrian President Bashar al-Assad at Hemeimeem air base. Sergei Chirikov / EPA file

It also follows the Russian announcement last week that the Syrian army under the Russian air cover routed the Islamic State in eastern Syria and fully restored control over the border with Iraq.

In a televised speech to the Russian troops at the base, Putin hailed their valor. "You have shown the best qualities of a Russian soldier," he said.

The Hemeimeem base, in the heartland of Assad's Alawite minority, has served as the main foothold for the Russian military campaign in Syria.

In a speech to the troops, Putin said that he had ordered the military to withdraw a "significant part" of the Russian contingent in Syria.

"Friends, the Motherland is waiting for you," Putin said. He added that "if the terrorists again raise their heads, we will deal such blows to them they have never seen."

Vladimir Putin with Assad (center) and Russian Defence Minister Sergei Shoigu. Michael Klimentyev / AFP - Getty Images

Russian television stations showed Putin walking off the plane, embracing and shaking hands with Assad at the air base.

Later, Putin arrived in Cairo for talks with his Egyptian counterpart on their two countries' rapidly expanding ties.

Egyptian President Abdel-Fattah el-Sissi gave Putin an official reception at Cairo's airport.

Since taking office in 2014, el-Sissi has bought billions of dollars' worth of Russian weapons, including fighter jets and assault helicopters.