Forces loyal to the regime of the Syrian president, Bashar al-Assad, have entered rebel-controlled parts of Daraa, the birthplace of protests that led to the country’s civil and proxy war, in a symbolic victory that illustrates the turning tides of the conflict.

Syrian state media said Assad’s forces hoisted their flag for the first time in years in the rebel-controlled parts of the city after a surrender deal was agreed with local rebels, which included a planned handover of weapons and the exile of opposition fighters and activists.

“Units of the Syrian Arab army entered the district of Daraa al-Balad and raised the national flag in the main square … a declaration that Daraa is now clear of terrorism,” said the state news agency Sana, referring to the opposition groups as terrorists.

The victory over rebels in the cradle of the uprising, and the reclaiming of the entire city for the first time in seven years, is a powerful symbol heralding the military defeat of a rebellion that aimed to unseat the Assad dynasty but was waylaid by violent government repression, the rise of Islamist extremists, the unwavering support of the regime’s allies Russia and Iran and the dithering of western powers.

The surrounding province of Daraa also has great strategic significance due to its proximity to the border with Israel, and it straddles the Jordanian border. Tel Aviv has warned it would not tolerate Iranian-backed militias close to the Golan Heights.

The Syrian government announced an offensive last month to reclaim all of the province of Daraa, where western-backed rebels controlled swathes of territory in what was ostensibly a “de-escalation” zone.

Rebels quickly sought to negotiate with Assad’s Russian sponsors after the US, which for years had backed the southern rebels, said it would not intervene militarily to protect them.

The Syrian Observatory for Human Rights, which has been monitoring the war, said rebels were still in the city, but on Thursday their departure appeared to be merely a matter of time. Government forces are now expected to turn to Idlib in the north, where Islamist militias and al-Qaida-linked militants control territory hosting more than two million internal refugees.