BEIRUT, Lebanon — The Syrian capital of Damascus and its surrounding suburbs are entirely free of rebel fighters for the first time in seven years, the government said on Monday.
That milestone was achieved when the last Islamic State fighters reached an agreement with the government over the weekend to leave the Palestinian refugee camp of Yarmouk and the neighboring town of Hajar al-Aswad and head to one of the militant group’s last strongholds in eastern Syria.
Their retreat, confirmed by the Syrian Observatory for Human Rights, a monitoring group, ended weeks of fighting that had reduced the camp, once home to about 160,000, to smoking, dusty rubble.
After the final convoy of militants left, the government released a statement saying, “The Syrian General Command of the Army and Armed Forces announced Damascus and Damascus countryside entirely safe areas after fully cleansing al-Hajar al-Aswad and al-Yarmouk Camp of terrorism.”
Syrian state television broadcast scenes of jubilant celebration among government troops entering the sorry landscape. Soldiers fired in the air and waved Syrian flags as residents looked on and buses with black curtains in their windows took away the last of the 1,600 Islamic State fighters who had been in the camp.
Syria’s president, Bashar al-Assad, lost control of large sections of the country in the early years of the war, which began in 2011, and seemed headed for defeat before Russia intervened on his behalf in 2015. The combination of Russian airpower and Iranian ground forces turned the tide, leading to today’s declaration.
In a meeting in Moscow last week with Mr. Assad, Russia’s president, Vladimir V. Putin, seemed to suggest that with the fighting dying down the time was ripe for a political settlement that would allow all foreign forces to wind up operations and head home. But with Turkey entrenched in the north and looking to defend its border with Syria, the United States guarding a section in the east and Israel trading military jabs with Iranian forces in the south, that prospect seemed unlikely, for the immediate future.
The Kremlin later amended last week’s statement, saying Mr. Putin was referring only to Iran, which quickly rejected the suggestion.
For proponents of the Syrian government, Monday was a day for celebration. But the losers were bitter about their fate.
“Yes, the regime, backed by the Russians, managed to eliminate the armed opposition from around Damascus,” said Rami al-Sayyed, a Syrian and former resident of Yarmouk, from Janderiss camp, in the northern countryside still controlled by the Syrian rebels.
“But the opposition still exists,” he said. “Russia managed to achieve its goals in politics and the military in Syria because of the opposition’s ignorance.”
Kyle Crichton contributed reporting from London.