A besieged town in the suburbs of Syria’s capital has agreed to a truce with President Bashar al-Assad’s government in exchange for badly needed food aid, Syrian activists said Thursday.

Government forces have laid siege to rebel-held Moadamiya for more than a year, depriving its residents of electricity, food and medicine amid heavy shelling and leaving some to die of starvation.

Other residents have subsisted on olives and scavenged leaves for months. This week’s agreement to raise the government flag over the town came after winter storms ravaged the few remaining plants that locals have depended on for sustenance, activists said.

“We did what they asked because we have a lot of starving civilians in the town,” said Qusai Zakarya, a spokesman for Moadamiya’s local activist council, who spoke Thursday over an Internet connection that he said was powered by an olive-oil-charged car battery.

Syrian rebels have accused Assad’s government of increasingly using the threat of starvation to subdue rebel-held towns as it seeks to strengthen its position ahead of planned peace talks next month.

Rebels have fought fiercely to gain control of a string of villages surrounding the capital, Damascus, but they say they have been unable to overcome the government’s superior weaponry.

Moadamiya was one of several rebel-held suburbs of Damascus that was targeted in an August chemical weapons attack that the United Nations has determined included the nerve agent sarin.

Previous cease-fires between Moadamiya’s rebels and Damascus allowed thousands of residents to flee the town. But about 8,000 chose to stay, too afraid of imprisonment and torture by the government’s forces to leave their homes, activists said.

Now, winter cold and continued shelling have weakened them further, activists said. Hepatitis has spread, and more than 100 people need urgent medical care, said Aya al-Mahayani, a 19-year-old activist in the town.

And so on Wednesday, local activists said, the rebels took down their flags and hoisted a government flag high over the town’s water tower — a gesture that they said the government had promised to reciprocate with a delivery of food aid within 24 hours.

“We don’t want anyone to say we missed a chance — even if it was humiliating — to have food come inside to save what’s left of the town,” Zakarya said.

The government has not commented on the reports of a truce, but a Syrian legislator told a Lebanese television station that the agreement requires Moamadiya’s fighters to hand over their heavy weapons and that government forces would remain on the town’s outskirts to “protect” it, according to the Associated Press.

Activists said that rebel fighters clashed briefly with Assad’s forces at the town’s edges Thursday afternoon but that the government flag remained flying in the hope that aid would come. By Thursday night, the 24-hour deadline had passed, but no food trucks had arrived. Activists said the government’s forces had also demanded that rebels expel any nonresidents.

“They said at first that they would send it after 24 hours. Then they said after 48 hours. And now they are saying 72 hours,” said Mahayani, who said she has eaten grape leaves and olives — “pretending it’s bread” — for the past four months, after residents ran out of lentils and the animals died off.

If the food never comes, “the regime’s flag will be taken down, and the rebels’ flag will be replaced,” she said.

Ahmed Ramadan contributed to this report.