BEIRUT -- Syria's military said Monday it had retaken the last neighborhoods in southern Damascus held by the Islamic State of Iraq and Syria (ISIS) and declared the Syrian capital and its surroundings "completely safe" from militants for the first time in nearly seven years. Reading an army statement on Syrian TV, Gen. Ali Mayhoub said the army captured the former ISIS strongholds in the Palestinian Yarmouk camp and Hajar al-Aswad after a month-long campaign. He said the army operations were "concentrated and successive," leading to the extremists' defeat in the city.

The gains by President Bashar Assad's troops bring greater Damascus -- including the capital's far-flung suburbs -- fully under government control for the first time since the civil war began in 2011.

"Damascus and its surroundings are completely secure," Mayhoub said.

State TV earlier said that government forces resumed an offensive at noon after a group of civilians was evacuated from the area overnight. Two hours later, the TV said troops captured ISIS' former stronghold of Hajar al-Aswad and broadcast images showing troops waving the Syrian national flag in the heavily destroyed neighborhood.

Get Breaking News Delivered to Your Inbox

A war monitoring group said some 1,600 people, including hundreds of ISIS gunmen, left the area on Saturday and Sunday, heading toward the desert east of the country following a deal with the government. The Britain-based Syrian Observatory for Human Rights said government forces were now clearing the nearby Palestinian refugee camp of Yarmouk, a built-up residential area, of the last remaining ISIS fighters. It said the month of fighting left scores dead on both sides.

The TV earlier quoted an unnamed Syrian military official as saying the two-day truce had been in place to evacuate women, children and the elderly on Sunday night from Hajar al-Aswad. Syrian state media denied a deal was reached to evacuate fighters.

The push into Hajar al-Aswad and Yarmouk came after government forces captured the last rebel-held southern and eastern suburbs of Damascus, boosting security in Assad's seat of power.

"The Daesh terrorist organization was wiped out in Hajar al-Aswad," an unnamed Syrian soldier told state TV, using an Arabic acronym to refer to ISIS. "We will keep marching until we liberate all parts of Syria."

Assad's forces have been making steady gains since 2015, when Russia 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, marking Assad's biggest victory since the conflict began. In March and April, thousands of opposition fighters surrendered and were evacuated from Damascus suburbs known as eastern Ghouta, after a crushing government offensive.

Shortly before noon on Monday, when the truce was supposed to end in Hajar al-Aswad, government warplanes struck ISIS positions as Syrian troops began advancing deeper into the neighborhood. The Observatory said ISIS fighters have been setting their offices and vehicles on fire so that government forces would not be able to seize equipment or documents belonging to the group.

The extremists have been driven from nearly all the territory they once held in Syria and neighboring Iraq, but still maintain a presence in remote areas along the border.

Both Russia and Iran have provided crucial military support to Assad's forces, giving them the upper hand in the civil war.

Russian President Vladimir Putin told Assad during a meeting last week that a political settlement in Syria should encourage foreign countries to withdraw their troops from Syria. Putin's envoy to Syria, Alexander Lavrentyev, said the Russian leader was referring to Iranian forces.

But on Monday, Tehran appeared to reject that idea, saying its forces will remain in Syria and continue fighting "terrorism" at the request of the Syrian government.

Iranian Foreign Ministry spokesman Bahram Ghasemi told reporters Monday that no one can force Tehran to do anything it doesn't desire to do. "Our presence in Syria has been based on a request by the Syrian government and Iran will continue its support as long as the Syrian government wants," he said.