Thousands of Syrians streamed into war-battered parts of Homs’s city center for the first time in nearly two years Saturday, many making plans to move back just days after rebels surrendered their stronghold to pro-government forces.

Men, women and children fanned through the city’s smashed ancient quarters, some in pickup trucks and on bicycles, while most walked on a breezy, sunny day.

A youth band banging drums and holding photographs of President Bashar al-Assad marched through the area, creating a celebratory mood for those supporting his government in the three-year-old conflict.

Residents scavenged what they could from their homes, mostly clothes, dusty mattresses and fire-damaged gas canisters, carrying them away in plastic bags and on trolleys.

“My house was completely destroyed and burnt, but I found some photos,” said Sarmad Mousa, 49, a resident of the old Hamidiyeh district. “They will remain a memory for me of the beautiful days we had here.”

1 of 16 Full Screen Autoplay Close Skip Ad × The child merchants of Beirut View Photos Thousands of Syrian refu­gee children work in neighboring Lebanon, selling flowers, tissues, chewing gum or shoe shines. Caption Thousands of Syrian refu­gee children work in neighboring Lebanon, selling flowers, tissues, chewing gum or shoe shines. Feb. 26, 2014 Abdullah, center, a 9-year-old refugee from Idlib, Syria, hugs his friends during an English class at the Home of Hope children’s home in Kahale, near Beirut. Before being sent to the center by the Lebanese courts, Abdullah slept on the streets in Beirut, selling chewing gum to get by. Sam Tarling/For The Washington Post Buy Photo Wait 1 second to continue.

Some accused rebels of looting and burning their homes. Smaller crowds made the journey Friday.

Other residents were already making plans to stay in their homes, sweeping them clear of rubble and smashed glass.

“God willing, we will sleep in our homes tonight, not tomorrow,” one man told Lebanese television station al-Mayadeen. “Even if the homes aren’t ready, we are going to help each other build our homes,” he said.

Hundreds of rebels surrendered their stronghold in Homs to government forces in exchange for their safe passage to the nearby northern countryside as part of a deal that took effect Wednesday. Some 2,000 rebels — and civilians living there — were badly weakened by the nearly two-year blockade and heavy bombing of the area.

The deal is widely seen as a victory for Assad weeks ahead of a presidential election on June 3 that he is expected to win, giving him a mandate to continue his violent crackdown on rebels in the civil war, which activists say has killed more than 150,000 people.

Assad has two little-known competitors in the presidential election, Maher al-Hajjar and Hassan al-Nouri, according to an announcement by Syria’s supreme constitutional court Saturday.

The court’s spokesman, Majed Khadra, made the announcement in a broadcast on state-run television.

More than 20 candidates had applied to run, but Khadra said they did not obtain the necessary support — approval of their candidacy by at least one-third of Syrian lawmakers. His announcement came after six of the original presidential hopefuls appealed to the constitutional court to accept their candidacies.

For rebels, it was a bitter day, said an opposition activist who uses the name Thaer Khalidiya.

“The fighters left to rest and get treatment, but they want to return to liberate Homs,” he said over Skype. “They want to go back.”

Municipal workers began repairing power lines in the city while bulldozers cleared rubble from the streets. The Syrian Red Crescent gave clean water, food and candles to residents who wanted to return to their homes, Gov. Talal Barazi said.

Danger still lurked in some areas. A man, woman and child have been killed in three separate explosions in Homs after detonating rebel-planted mines left in their homes, Barazi said.

At least five military vehicles carrying soldiers searched the area for more explosives.