Rebel resistance in the Syrian city of Aleppo ended on Tuesday after years of fighting and months of bitter siege and bombardment that culminated in a bloody retreat, as insurgents agreed to withdraw in a cease-fire.

The battle of Aleppo, one of the worst of a civil war that has drawn in global and regional powers, has ended with victory for Syrian President Bashar Assad and his military coalition of Russia, Iran and regional Shiite militias.

For rebels, their expected departure with light weapons starting on Wednesday morning for opposition-held regions west of the city is a crushing blow to their hopes of ousting Assad after revolting against him during the 2011 Arab uprisings.