Russian President Vladimir Putin has made a surprise visit to Syria, declaring victory and ordering the Russian military to start withdrawing a "significant portion" of its forces from the war-ravaged Middle Eastern country.

"I order the defense minister and the head of the General Staff to begin the withdrawal of the Russian group of forces to their permanent places of deployment," Putin said in comments to servicemen at Russia's air base in Syria on December 11.

Putin, who met at the Hmeimim base with Syrian President Bashar al-Assad, said that Russian and Syrian forces had "crushed the most combat-capable international terrorist group."

"In light of this, I have made a decision: a significant portion of the Russian military contingent in [Syria] is returning home, to Russia," Putin said.

WATCH: Russian President Vladimir Putin has ordered the Russian military to start withdrawing a "significant portion" of its forces from Syria. (Reuters)

Putin's first known visit to Syria during the war there came five days after the Russian president, who has sought to bolster his support at home by reviving Moscow's global clout, announced he will seek reelection in a Marсh 18 vote.

He gave no specific time frame for the pullout and said the Hmeimim base and a Russian naval facility at Tartus, on Syria's Mediterranean coast, will continue to operate, Russian news agencies reported.

Russia has given Assad's government crucial military backing throughout the war, which has killed hundreds of thousands of people and displaced millions since it began with a state crackdown on pro-democracy protesters in March 2011.

Russia began a campaign of air strikes in September 2015 and has stepped up its military involvement on the ground since then, protecting Assad from rebels -- some Western-backed -- and helping turn the tide of the conflict in his favor.

A brief Kremlin statement said Putin met with Assad as well as Russian Defense Minister Sergei Shoigu and the commander of Russian forces in Syria, Sergei Surovikin.

It said he ordered the start of the withdrawal and thanked Russian servicemen for taking part in what Moscow calls a "counterterrorism operation."

Surovikin later said the military will pull out 23 warplanes, two helicopter gunships, special forces units, military police, and field engineers.

The remaining forces will be sufficient to "successfully fulfill the tasks" to stabilize the situation in Syria, he said, but did not specify how many troops and weapons would remain.

The Pentagon expressed skepticism about the announced withdrawal of troops and equipment from Syria. Army Colonel Rob Manning, a Pentagon spokesman, said Russian statements "do not often correspond" with actual troop reductions.

Putin has issued similar orders before. In March 2016, Putin ordered the start of "the withdrawal of the main part of our military contingent” from Syria, but there were few signs of a pullout after that announcement.

The new order comes after major setbacks for the extremist group Islamic State (IS), which seized large parts of northern Syria and Iraq in 2014 but has been driven from key strongholds, including the Syrian city of Raqqa.

Amid severe tension between Moscow and Washington, Russia and the United States have conducted separate campaigns of air strikes against IS militants.

Assad and Moscow refer to nearly all the Syrian government's opponents as terrorists, and Western officials say that Russia used much of its firepower in Syria against rebels seeking Assad's ouster rather than against IS.

Putin praised the Russian forces in a televised address at Hmeimim, which is in the heartland of the Alawite minority in the coastal province of Latakia and has been the main foothold for Moscow's military campaign.

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

Putin's new pullout order comes after gains in the conflict have strengthened Assad's position in intermittent UN-sponsored negotiations aimed at ending the war and launching a political transition.

The same developments have undermined the leverage of opponents of Assad and Western countries, including the United States and Turkey, that want him out of power.

Putin's visit to Syria came amid a flurry of Middle East diplomacy following U.S. President Donald Trump's decision to recognize Jerusalem as Israel's capital, which angered many governments in the region and worldwide.

Putin flew from Syria to Egypt for talks with President Abdel Fattah al-Sisi and then flew to NATO-member Turkey later on December 11 to meet with President Recep Tayyip Erdogan.

"After those negotiations, we will contact you and will inform you in detail of what we will do together" to resolve the conflict, the Russian news agency Interfax quoted Putin as telling Assad.

Western governments including the United States say that there is no place for Assad in Syria's future, but have softened their stances in recent years over the timing of his departure.

Russia has repeatedly said that Assad's exit from power must not be a precondition for a political settlement.

Russia has faced strong criticism from Western governments and human rights groups over its military and diplomatic backing for Assad, and the conflict in Syria has contributed to severe tension between the United States and Russia.

Citing unidentified U.S. officials, The New York Times reported on December 11 that Russian fighter jets have flown dangerously close to U.S. warplanes over eastern Syria in the past month.

In one case, the report said, two U.S. Air Force A-10s nearly collided head-on with a Russian Su-24 but swerved to avoid the aircraft.

With reporting by RIA Novosti, AP, Interfax, TASS, Reuters, and The New York Times