Hours of air strikes and shelling on Saturday struck Jayrud, 60 kilometres (35 miles) northeast of Damascus, according to the Syrian Observatory for Human Rights.
Observatory head Rami Abdel Rahman said two medics were among the dead, as well as women and children.
One of those killed was Amjad al-Danaf, head of Jayrud's medical centre.
Activists mourned him online and said he was killed in an air raid as he was trying to treat residents wounded in the attacks.
The bombardment -- the first on Jayrud in at least two years -- began after Syria's armed forces said Islamist militants killed a government pilot when he was forced to eject from his plane on Friday.
In a statement, the military had pledged that the attack on its pilot "will not go unpunished".
Early Sunday, Abdel Rahman said prominent figures in Jayrud had reached an agreement with government officials that rebel fighters would leave the town and hand over the pilot's body in exchange for a halt to the shelling.
A Facebook page run by Jayrud activists that publishes news about the town said rebels began withdrawing from their bases around the town overnight.
Anti-regime factions in Jayrud include the Saudi-backed Jaish al-Islam (Army of Islam), the hardline Ahrar al-Sham, and Al-Qaeda affiliate Al-Nusra Front.
A truce between the regime and local representatives had kept the town calm for over two years.
Dozens of similar agreements have been brokered among the myriad of armed groups fighting in Syria's complex war.
But a broader ceasefire between government forces and non-jihadist rebels brokered by the United States and Russia in February has been repeatedly violated by both sides.
More than 280,000 people have been killed and millions have been displaces since Syria’s conflict broke out in March 2011.