BEIRUT - Carrying their rifles and belongings, about 1,200 exhausted Syrian rebels and civilians were evacuated Wednesday from the fighters' last remaining strongholds in the heart of Homs, surrendering to President Bashar Assad a bloodstained city that was once the center of the revolt against him.

For Assad, it is a powerful victory ahead of presidential elections. For the rebels, the dramatic exit after two years of enduring grueling assaults and siege captures their sense of abandonment amid the world's reluctance to help shift the balance of power on the ground.

It was a bitter moment for the exhausted rebels, who had pledged to fight to the end in Homs. With food and medicine short, a first major group - around 1,400 people, including fighters and residents - evacuated earlier this year in a U.N.-mediated operation.

"We ate grass and leaves until there was nothing left for us to eat," said opposition activist Abu Yassin al-Homsi, who was preparing to leave with the rebels later Wednesday. "We kept urging the international community to lift the siege but there was no response."

The exit marks a de facto end of the rebellion in the war-shattered city. Homs, with a prewar population of 1.2 million was among the first to rise up in early 2011 with waves of exuberant anti-Assad protests. As Syria's conflict turned into outright civil war, rebels took control of nearly 70 percent of Homs, whose population represents Syria's mix - a largely pro-rebel Sunni majority and a pro-Assad Alawite minority, along with Christians and other religious and ethnic minorities.

The city quickly came under a series of crushing government offensives, turning into a battleground that left entire blocks and much of its historic quarters in ruins. Thousands of people were killed and almost all its residents fled.

Gaining virtually full control of Syria's third largest city is a major win for Assad on multiple levels. Militarily, it solidifies the government hold on a swath of central Syria, linking the capital Damascus with government strongholds along the coast.

Politically, gains on the ground boost Assad's hold on power as he seeks to add a further claim of legitimacy in presidential elections set for June 3, which Western powers and the opposition have dismissed as a sham.

Syrian officials say the vote will only be held in government-controlled areas.