The Syrian government took full control of Aleppo on Thursday for the first time in four years after the last opposition fighters and civilians were bused out of war-ravaged eastern districts, sealing the end of the rebellion's most important stronghold.

The evacuations ended a brutal chapter in Syria's nearly six-year civil war, allowing President Bashar al-Assad to regain full authority over the country's largest city and former commercial powerhouse. It marked his most significant victory since an uprising against his family's four-decade rule began in 2011.

The announcement was made via an army statement broadcast on Syrian state TV shortly after the last four buses carrying fighters left through the Ramousseh crossing. 

"Thanks to the blood of our heroic martyrs, the heroic deeds and sacrifices of our armed forces and the allied forces, and the steadfastness of our people, the General Command of the Army and the Armed Forces announces the return of security and stability to Aleppo," an army general said in the statement.

MIDEAST-CRISIS/SYRIA-HERITAGE

A general view shows damage in the Old City of Aleppo on Dec. 13. The Syrian army says it has returned the war-torn city to 'security and safety.' (Omar Sanadiki/Reuterss)

At least 34,000 people, both civilians and fighters, have been evacuated from east Aleppo in a weeklong operation hampered by severe winter weather, the latest United Nations figures show

Western Aleppo erupted in heavy celebratory gunfire, with Syrian TV showing uniformed soldiers and civilians shouting "Aleppo, Aleppo!" and "God, Syria and Bashar only!"

"No more east and west, Aleppo is back for all Aleppans," said the Syrian TV correspondent, surrounded by people waving Syrian flags.

Crushing defeat 

For Syria's opposition, it was a crushing defeat that signalled the start of a new struggle to forge a way forward.

Ahmad al-Khatib, an opposition media activist who left the city before the siege, said the fall of Aleppo was a date "we'll never forget and we will never forgive."

"Let the world bear witness that Bashar Assad has killed and displaced and destroyed Aleppo, and he celebrates in his victory over the blood and offspring of Aleppo ... with the agreement of the Arab and Western nations," he posted on Twitter.

The ancient city had been divided into rebel and government parts since 2012, when rebels from the countryside swept in and took hold of eastern districts. That set the stage for more than four years of brutal fighting and government bombardment that laid waste to those neighbourhoods.

'Let the world bear witness that Bashar Assad has killed and displaced and destroyed Aleppo, and he celebrates in his victory over the blood and offspring of Aleppo.' - Ahmad al-Khatib, opposition activist 

The army statement said the victory in Aleppo is a "strategic transformation and a turning point in the war on terrorism and a deadly blow to the terrorist project and its supporters."

Assad said his forces' achievements in Aleppo are a "major step on the road to wiping out terrorism" and ending the civil war.

He declared that the war is far from over and that his armed forces would march on other rebel-held areas in Syria.

Assad said earlier that retaking Aleppo was a victory shared with his Russian and Iranian allies.

Russia's air force conducted hundreds of raids that pulverized rebel-held parts of Aleppo while Iranian-backed militias, led by the Lebanese group Hezbollah, poured thousands of fighters into the city.

'The next Aleppo'

Thousands of refugees from Aleppo were taken to Idlib, arousing fears that the rebel-held city in northwestern Syria could be next.

A senior United Nations official warned that those evacuated from Aleppo after the crushing government offensive could suffer the same fate in their new place of refuge outside the city. 

"Many of them have gone to Idlib, which could be, in theory, the next Aleppo," UN Special Envoy Staffan de Mistura said in Geneva.

He said a cessation of hostilities across Syria was vital if another battle like the bloody struggle for Aleppo was to be avoided.

Other evacuees are being taken to villages in the countryside in Aleppo province west and north of the city, which have also been heavily bombed. 

Rebel-besieged villages also evacuated

Hundreds of other people were also evacuated from two villages besieged by rebels near Idlib and taken to government lines in Aleppo, part of the deal that has allowed insurgents to withdraw from the city carrying light weapons.

MIDEAST-CRISIS/SYRIA

People were also evacuated from two villages besieged by rebels near Idlib. (Ammar Abdullah/Reuters)

MIDEAST-CRISIS/SYRIA

Evacuees from the Shia Muslim villages of al-Foua and Kefraya ride a bus at insurgent-held al-Rashideen in Aleppo province on Thursday. (Ammar Abdullah/Reuters)

A rebel official said a heavy snow storm that hit northern Syria and the sheer numbers involved had delayed the evacuation.

"The numbers of civilians, their cars alongside and of course the weather all are making the evacuation slow," Munir al-Sayal, head of the political wing of Ahrar al Sham, said.

With files from Reuters