Hundreds of Syrian rebels have abandoned the heart of Homs city, an early centre of the revolt against President Bashar al-Assad.

The withdrawal hands President Assad a symbolic victory weeks before his likely re-election.

Two convoys of buses carrying fighters left the besieged and ruined city centre, the first of several convoys due to take part in an evacuation agreed between insurgents and forces loyal to Mr Assad.

The deal also calls for the release of captives held by rebels in Aleppo and Latakia provinces, and the easing of a rebel siege of two Shia towns in northern Syria.

The fighters, almost all Sunni Muslim, had held out in the Old City of Homs and neighbouring districts despite being  undersupplied, outgunned and subjected to more than a year of siege and bombardment by Mr Assad's forces.

Video footage of the first convoy showed a group of men climbing aboard a green bus, watched by around a dozen men in khaki uniform and black flak jackets marked "police".

In front of the bus was a white car with the markings of the United Nations, which helped oversee the operation.

Activists said a total of 1,900 people, mainly rebel fighters, were being evacuated, starting with 600 wounded fighters and civilian relatives. Most of the people boarding the bus in central Homs appeared to be fit men of fighting age.

Later video showed them arriving in a rebel-held area north of the city.

Unlike an evacuation of civilians from Homs in February, activists said they were not detained for checks by security forces and were allowed to keep their light weapons.

The evacuation comes after months of gains by the army, backed by its Lebanese militant ally Hezbollah, along a strategic corridor of territory linking the capital Damascus with Homs and Mr Assad's Alawite heartland on the Mediterranean.

The final rebel withdrawal from the centre of the city, known as the "capital of the revolution" when protests first erupted against Mr Assad in 2011, would consolidate his military control ahead of a presidential election on 3 June.

Mr Assad is widely expected to be the runaway victor in the vote, which his opponents have dismissed as a charade.

They say no credible election can be held in a country fractured by civil war, with swathes of territory outside government control, 6 million people displaced and another 2.5 million refugees abroad.

Under the deal which allowed the evacuation from Homs, the rebels agreed to ease their siege of the Shia towns of Nubl and Zahraa.

The Syrian Observatory for Human Rights said rebels opened the roads to allow aid into the two northern towns this morning at the same time as the first buses collected the departing rebel fighters from Homs.

However by mid-afternoon planned aid had yet to reach Nubl, one resident was quoted as telling regional television channel Al-Mayadeen.

Rockets were also fired towards the towns, although there were no immediate reports of casualties.

The fighters are expected to leave Homs in up to nine convoys, carefully synchronised with the aid delivery and the release of captives held by the rebels near Nubl and Zahraa, and the town of Kassab in Latakia province.

One activist said a Russian national and several Iranians were among those being released by the rebels. There was no independent confirmation, but Moscow and Tehran have both supported Mr Assad in the three-year-old civil war.

More than 150,000 people have died in the conflict. Millions more have fled their homes and the government has lost control of swathes of territory across the north and east.

Fighting regularly kills more than 200 people a day.

Provincial governor Talal Barazi said this operation would ultimately clear the whole of Homs city of gunmen and weapons, suggesting rebels would also be evacuated from the suburb of Al-Waer on the city's north-western outskirts.

Rebels in Al-Waer and districts around the Old City have held out against Mr Assad's forces since the army drove them out of the ruins of Baba Amr district, epicentre of the rebellion, in March 2012.

Since then the army has gradually tightened its grip around the rebel areas, blocking weapons, medical supplies and food. It allowed hundreds of civilians to leave in February after lengthy UN mediation.