The Syrian Army says it has retaken Aleppo from rebel forces and completed the evacuation of civilians from the eastern part of the city, despite a United Nations warning that thousands remain stranded.

The announcement means the whole city is now under government control after a four-year battle and represents a major victory for the regime of President Bashar al-Assad.

In a statement broadcast on the state-run Syrian Arab News Agency, the Syrian Army said: "This victory represents a strategic change and a turning point in the war against terrorism on the one hand and a crushing blow to the terrorists' project and their supporters on the other hand."

Around 34,000 people have been evacuated from the besieged city since ceasefire rescue operations began on Thursday 15 December.

However, several breakdowns of security marred the process - with coaches intermittently shot at and set on fire.

The UN also continue to warn that thousands of people remain in eastern Aleppo in worsening winter conditions, despite the Syrian Army's proclamations.

"The process for evacuation was traumatic, with crowding, and vulnerable people waiting for hours and exposed to sub-zero temperatures," UN spokesman Farhan Haq told Reuters.

The evacuees from Aleppo will be taken to rebel-held areas in Idlib province. However, the UN has stressed that refugees from Aleppo could face new risks in Idlib, potentially set to be targeted by Syrian forces along with reinforcements from Russia and Iran.

In a reciprocal gesture Shi'ite villagers have been evacuated from Foah and Kefraya villages which were surrounded by Sunni rebels in the same area. The deal was arranged by Turkey and Russia, who although on different "sides", stand to gain from increased in influence in the region.

Aleppo evacuation complete December 2016
Syrian rebel fighters, arrive in the opposition-controlled Khan al-Assal region, west of Aleppo after being evacuated from the embattled city, on December 22, 2016 OMAR HAJ KADOUR/AFP/Getty Images

Hundreds of thousands of people have died in the five-year civil war, as rebel forces tried to overthrow President Assad.

The city has since been bombarded from all sides as districts swapped hands, but the intervention of Russia and Lebanese Hezbollah handed the advantage to Assad and the number of rebel-held districts diminished.

Assad paid tribute to his Russian and Iranian allies as Aleppo fell back into his control, claiming it represented another "basic step on the road to ending terrorism in the whole of Syria and creating the right circumstances for a solution to end the war".