Updated

Syria's government and rebels agreed to a ceasefire Friday in the battleground city of Homs to allow hundreds of fighters holed up in its old quarters to evacuate, a move that would surrender almost total control of the city once known as the "capital of the revolution" to forces loyal to President Bashar Assad.

The capture of Homs, Syria's third largest city, would be a significant victory for Assad, weeks before presidential elections set for June 3 -- if the agreement goes through and rebel fighters leave.

The 48-hour cease-fire deal came after weeks of unprecedented pounding of rebel-held districts by government force. One Homs-based opposition activist said it was a bitter moment for the rebels who have been barricaded in 13 neighborhoods around Homs' historic center.

"This isn't what we wanted, but it's all we could get," Beibars Tilawi told The Associated Press in a Skype interview.  "The regime wanted to take control of the heart of the revolution." Evacuations may start on Saturday, he said.

Residents of Homs, in the central western plains of Syria, were among the first to rise fiercely against Assad's rule three years ago, earning it the nickname of the "capital of the revolution." After waves of anti-Assad protests by its residents, rebels seized control of much of the city and Homs quickly became the focus of the worst violence of the uprising, now in its fourth year.

Homs, about 80 miles north of Damascus, is particularly important for its centrality. It links the capital with Aleppo in the north -- the country's largest city and another key battleground.

Large swathes of Homs have been blasted into rubble as Assad's forces engaged in grueling urban warfare trying to wrest it back. For more than a year, government troops have blockaded rebels inside a string of districts spread over some eight miles (13 kilometers), causing widespread hunger and weakening the fighters.

Heavy airstrikes and artillery bombardment of rebel-held areas intensified in past weeks, as government troops won other victories further south near Damascus and the Lebanon border, hurting supply lines. Rebels outside Homs did not come to the aid of the fighters within, and the past few months hundreds of fighters surrendered to Assad-loyal forces, activists said.

But a hardcore group remained fighting, dispatching explosive-rigged cars into government-controlled districts of Homs, killing dozens of people, mostly civilians. Most recently, a double car bombing on Tuesday killed over 50 people.

Rebels in Homs had been trying to negotiate a truce for at least two months, but it took a final, violent push of fighting to seal the deal, activists said. United Nations officials oversaw the agreement, according to Tilawi. U.N. officials weren't immediately available for comment. The U.N. helped oversee the evacuation of hundreds of civilians in February this year.

An Associated Press team in Homs on Friday said it was unusually quiet, with no shots fired from either side.

Syrian army soldiers with machine guns, manning checkpoints inside the city, appeared relaxed, although there were signs of mortar shells hitting streets and houses close to their positions, leaving facades poked with shrapnel.

At the checkpoints, posters of Assad -- many with him smiling confidently -- hung off sandbags and makeshift barriers made of truck tires, with the Syrian national flag fluttering overhead.

The 48-hour truce began on Friday, said Tilawi and another activist who goes by the nickname Thaer Khalidiya, who is based in countryside north of Homs. The deal was also reported by the Britain-based Syrian Observatory for Human Rights, which monitors the conflict, and the Al-Manar TV channel, owned by Assad's Lebanese Hezbollah allies, as well as by Lebanese channel Al-Mayadeen.

There was no immediate comment by Syrian officials.

It wasn't immediately clear how the rebels would leave Homs -- or if all rebel districts in the city had agreed to the deal.

Tilawi said the fighters would leave in groups, beginning from Saturday. They will be taken to rebel-held provincial towns north of Homs. He estimated at least 1,000 rebels and activists had to be evacuated.

The rebels belonged to all factions, including the Al Qaeda based Nusra Front, he said. "We agreed to evacuate fighters, not factions," he said.

But he, and other rebels cautioned that the deal was still extremely fragile.

"We don't trust the regime. If there's any shooting or traps set, the whole thing will fall apart," he said. "We are going to try get out the first group of fighters and see."

Also on Friday, two car bombs struck two small villages in the central Syrian province of Hama, killing 18 people, including 11 children, state-run television said.

The TV said the rigged vehicles exploded in the pro-government villages of Jadreen and Humayri in the morning hours. The villages are about a 20-minute drive, or 11 miles apart, but it wasn't immediately clear if the two attacks were coordinated.

The increasing use of car bombs has added another grim dimension to Syria's bloody conflict, now in its fourth year. The war began as an uprising in March 2011 against Assad's rule but is now a full-fledged civil war, with over 150,000 people killed in the violence.

Pro-government forces are trying to rout rebels ahead of presidential elections set for June 3, aiming to scatter fighters to their northern and southern borders, where they have supply lines to Turkey and Jordan respectively.

It would be the latest military gain for Assad after near-clearing rebels from a broad swath of territory south of Homs between the capital, Damascus, and the Lebanese border, breaking important rebel supply lines there. Rebels have also capitulated in several towns around Damascus after blockades that caused widespread hunger and suffering.