BEIRUT (Reuters) - The Syrian army has restored control over all areas surrounding the capital Damascus for the first time since early in the seven-year-old war, after pushing Islamic State militants out of a south Damascus pocket, the military said.

A Syrian army soldier stands on a military vehicle at a damaged site in al-Hajar al-Aswad, Syria May 21, 2018. REUTERS/Omar Sanadiki

Pro-Syrian government forces have been battling for weeks to recover al-Hajar al-Aswad district and the adjacent Yarmouk Palestinian refugee camp from Islamic State since driving rebels from eastern Ghouta in April.

In a televised statement Syria’s army high command said al-Hajar al-Aswad and Yarmouk had been cleared of militants.

“Damascus and its surroundings and Damascus countryside and its villages are completely secure areas,” the statement said, adding that the army would continue to fight “terrorism” across Syria.

With its complete capture of the environs of the capital, the government of President Bashar al-Assad is now in by far its strongest position since the early days of the war, which has killed more than half a million people and driven more than half the population from its homes since 2011.

Anti-Assad rebels now mainly control just two large areas in the northwest and southwest near borders with Turkey and Jordan. Turkey and the United States also have presences in parts of Syria outside government control.

The ultra-hardline jihadist group Islamic State, which was driven from most of the Euphrates River valley last year, now controls only two besieged desert areas in eastern Syria. Another insurgent group that has pledged loyalty to it holds a small enclave in the southwest.

Islamic State also captured a third of neighboring Iraq in 2014 but was largely defeated there last year.

FIRING IN CELEBRATION

A temporary humanitarian ceasefire had been in place since Sunday night in al-Hajar al-Aswad to allow women, children and old people to leave the area, state media said early on Monday.

Army soldiers fired into the air in celebration and held Syrian flags, against a smashed cityscape of shattered buildings and widespread destruction, state television footage showed.

Buildings and walls were pocked-marked from bullets and shell-fire, metal satellite dishes were bent and scorched, and the dome of a mosque had a gaping hole near its base.

On Sunday, a war monitor said fighters had begun withdrawing from the area towards Islamic State territory in eastern Syria under a surrender deal, but state media said fighting continued.

Slideshow ( 9 images )

The war monitor, the Britain-based Syrian Observatory for Human Rights, said on Monday that buses had already started leaving south Damascus for Islamic State areas in eastern Syria.

A U.S.-led military coalition fighting Islamic State in Syria and Iraq said in an emailed statement to Reuters it was “aware of reports of an evacuation near Yarmouk and south Damascus” and was monitoring the situation.

While Assad has vowed to win back “every inch” of Syria, the map of the conflict suggests a complicated time ahead.

The U.S. military is in much of the east and northeast, which is controlled by Kurdish groups that want autonomy from Damascus. It has used force to defend the territory from pro-Assad forces.

Turkey has sent forces into the northwest to counter those same Kurdish groups, carving out a buffer zone where anti-Assad rebels have regrouped.

In the southwest, where rebels hold territory at the Israeli and Jordanian border, Assad faces the risk of conflict with Israel, which wants his Iranian-backed allies kept well away from the frontier and has mounted air strikes in Syria.