Syrian government forces raised their flag over the Yarmouk Palestinian camp in Damascus on Tuesday as state media promoted what it said was the "liberation" of the last quarters of the capital from rebels and Islamic State group militants.

Police motorcycles flying the flag roared into what was left of the neighborhood in a show for state media, and a detachment of soldiers raised the government's standard from the roof of what is now a shell of a building.

The ceremonies, broadcast on state-affiliated al-Ikhbariya TV, was meant to assure residents that Damascus was secure for the first time since protests broke out against President Bashar Assad in 2011. The government cracked down violently on the demonstrations, igniting the ongoing civil war.

Syria's military announced it had recaptured the camp and surrounding neighborhoods from Islamic State group militants on Monday, bringing the entire capital and its suburbs under full government control for the first time since the 2011.

Police officers and soldiers standing in formation in the rubble of the Hajr al-Aswad neighborhood chanted half-heartedly for the president in what has become a ritual of pageantry after every advance by the government against the crumbling opposition movement and separate IS insurgency.

But after the ceremony, the soldiers erupted in a cheer and let off bursts automatic gunfire into the air. They promised the cameras they would be heading to Daraa, a city near the border with Israel, which was the first to revolt against Assad in the Arab Spring protests earlier this decade.

Daraa remains split between government and rebel control.

The battles for Yarmouk and Hajr al-Aswad left both neighborhoods catastrophically damaged. Yarmouk, once home to about 200,000 Palestinian refugees, was deserted by most of its inhabitants as the government laid siege to it and Islamic State militants moved in in 2015. In the last month, the government began bombing the neighborhood intensively.

The advance put the capital out of range of insurgents' mortar fire and shelling for the first time in nearly seven years.

The Haq news agency, affiliated with the IS group, put out a statement on Tuesday saying the militants left the south Damascus neighborhoods "with their heads high" after forcing the government to agree to let them evacuate instead of pursuing a stalemated ground battle.

With Iran's help, Assad's forces have been making steady gains since 2015, when Russian launched an air campaign on behalf of his forces. In December 2016, government forces captured rebel-held eastern neighborhoods of the northern city of Aleppo, in Assad's biggest victory since the conflict began.

With a mix of military pressure and surrender deals brokered by Russia, thousands of opposition fighters capitulated and were evacuated in March and April from Damascus suburbs known as eastern Ghouta after a crushing government offensive.

Syrian troops and their allies are expected to turn their attention to opposition-held parts of southern Syria, including Daraa province, in a push that could bring allied Iranian forces even closer to the increasingly tense frontier with Israel. Idlib, in the north, remains a major rebel bastion, but government forces are expected to leave that confrontation to a later stage.