MOSCOW, Dec 11, (AP): Russian President Vladimir Putin declared victory against “terrorists” in Syria on Monday during a surprise visit to a Russian military base in the county, where he also announced a partial pullout of Russian troops. It was Putin’s first trip to Syria, where Russia launched an air campaign in 2015 that allowed President Bashar Assad’s forces to gain the upper hand against the Islamic State group as well as Syrian rebels.It was also the first visit by a foreign head of state to war-ravaged Syria since the civil war began in 2011. Putin’s brief stop at the Hemeimeem air base in Syria’s coastal province of Latakia while en route to Egypt came days after the Russian president said he would run for re-election on March 18, and helped to show off Moscow’s global clout to the national audience. In a televised speech to the Russian troops at the base, Putin hailed their “excellent” performance in Syria, where the Russian military declared victory against the Islamic State group last week. “You have shown the best qualities of a Russian soldier — courage, valor, team spirit, decisiveness and excellent skills,” he said.“The Motherland is proud of you.” Russia launched its air campaign in Syria at the end of September 2015, when Assad’s government was teetering on the brink of collapse, and quickly changed the course of the conflict. Russian officials say the troops were sent to Syria mainly to fight “terrorists,” including IS and al-Qaeda, but they also battled mainstream rebels opposed to the Assad family’s four-decade rule. Putin has hosted Assad twice in the past six years, including a surprise Nov 21 visit that Assad undertook to the Black Sea resort of Sochi.Russian television stations showed Putin walking off the plane at the air base, embracing and shaking hands with Assad. The two then visited a military operations room. The Hemeimeem base, located in the heartland of Assad’s Alawite minority, has served as the main foothold for the Russian military campaign in Syria. “Here in Syria, far away from our borders, you helped the Syrian people to preserve their state and fend off attacks by terrorists,” Putin said, facing the troops lined up on the tarmac. “You have dealt a devastating blow to those who blatantly threatened our country. We will never forget about the victims who fell in the fight against terror both here and in Russia.”Putin also 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. “You are coming back home with victory!” He added, however, that the Russian military will maintain its presence at Hemeimeem and a naval facility in Tartus.Gen Sergei Surovikin, the Russian military commander in Syria, said the military will pull out 23 warplanes, two helicopter gunships, special forces units, military police and field engineers. Surovikin said the remaining forces will be sufficient to “successfully fulfill the tasks” to stabilize the situation in Syria. He did not say how many troops and weapons would stay behind. Syria has allowed Russia to use Hemeimeem air base indefinitely without cost. Moscow also has a deal with Syria to use the Tartus base for 49 years, which could be extended if both parties agree.The Russian military plans to modernize the air base and expand its runways to allow it to host more warplanes. It also intends to expand the Tartus facility significantly to make it a full-scale naval base capable of hosting warships, including cruiser-sized vessels. After seeing troops march, Putin drove up to the Russian warplanes parked on the runway and talked to the pilots, who said they will fly back home later in the day. Syrian TV said Assad thanked Putin for his troops’ “effective contribution” to the fight against terrorism in Syria, which he said the Syrian people “will never forget.” “Syria has been saved as a sovereign, independent state, refugees are coming home and conditions have been created for a political settlement under the United Nations’ auspices,” Putin said. Insurgents still control several areas in Syria, but much of the fighting has been paused by “de-escalation” agreements brokered by Russia and Iran, which support Assad, and Turkey, which backs the rebels. Putin told Assad he would discuss the prospects for a peace settlement with the leaders of Egypt and Turkey later Monday.“I hope that together with Turkey and Iran we will succeed in restoring peaceful life and launch a political process to settle the situation in Syria,” Putin said. Putin meanwhile visited Egypt on Monday, where he signed a deal to advance plans for a nuclear reactor but disappointed his hosts by delaying the resumption of direct flights that were suspended after the 2015 bombing of a Russian passenger plane. During Putin’s second visit to Egypt in as many years, he and Egyptian President Abdel-Fattah el-Sissi appeared keen to cement their countries’ ties, which have deepened in recent years as Moscow has expanded its reach across the region.“Russia always paid a special attention to expanding friendly and mutually beneficial ties with Egypt, our longtime reliable partner in the Middle East and North Africa,” Putin said. El-Sisi said the two countries had “a relationship with a long history,” characterized by “strength and durability.” El-Sisi, who has visited Russia twice since taking office in 2014, has signed deals to buy billions of dollars’ worth of Russian weapons, including fighter jets and assault helicopters. Last month, Russia approved a draft agreement with Egypt to allow Russian warplanes to use Egyptian military bases.The United States remains Egypt’s main international backer, providing an estimated $1.3 billion in military and economic aid each year. But ties suffered a blow in 2013, when the Obama administration criticized the military overthrow of Egypt’s first freely elected leader amid mass protests against his rule. Relations have improved under President Donald Trump, who has also sought better relations with Moscow.Neither Putin nor el-Sisi referred to the use of the air bases when they read prepared statements after their talks, a possible indicator of the sensitivity of the issue in Egypt, which has long rejected the basing of foreign forces on its territory. With Putin and el-Sisi looking on, officials from both countries signed the deal on the nuclear reactor.Egypt has reached an agreement in principle to borrow $25 billion, or roughly 80 percent of the reactor’s cost, from Russia. The signing of the agreement ends months of wrangling between the two sides over technical and financial details. Putin flew to Cairo after a brief and previously unannounced visit to a Russian military air base in Syria.The air base has served as the main foothold for the air campaign Russia has waged since September 2015 in support of Syrian President Bashar Assad. Egypt’s increasingly close ties with Russia harken back to the 1950s and 1960s, when Cairo became a close Russian ally at the height of the Cold War. Egypt changed sides in the 1970s under the late President Anwar Sadat, who replaced Moscow with Washington as his country’s chief economic and military backer following the signing of a US-sponsored peace treaty with Israel in 1979. Egypt has since become a major recipient of US aid.