The Syrian army has regained full control of two central villages from the Islamic State group after an attack that killed dozens of people, a monitor said on Friday.
Troops and allied militiamen retook the Hama province villages of Aqareb and Al-Mabujeh a day after the jihadist assault, the Syrian Observatory for Human Rights said.
The IS attack killed 25 civilians, including five children, and 27 pro-government fighters, the Britain-based monitor said.
At least three of the civilians, a man and his two children, were executed with knives, it added.
The Observatory reported 10 IS fighters killed in the assault, which began at dawn on Thursday and saw jihadists briefly seize all of Aqareb and parts of Al-Mabujeh.
State news agency SANA said 52 people had been killed, among them 15 children, adding that many of the dead had been beheaded and mutilated.
The two villages are home to members of several religious minority sects, and Al-Mabujeh has been targeted by IS before.
In March 2015, the group killed dozens of people and kidnapped some 50 civilians in an attack there.
IS is on the defensive across most of the territory it still holds in Syria, with an alliance of Kurdish and Arab fighters pressing towards its most important bastion, Raqa in the north.
The army is also battling the jihadist group in the eastern part of Aleppo province.
The Observatory said at least 22 government troops and allied militiamen and 40 IS fighters had been killed in clashes in the area in the past 24 hours.
And in the eastern city of Deir Ezzor, which is largely under IS control, jihadist shelling of a government-held neighbourhood killed at least 14 people, the monitor said.
A dozen people were also wounded by the artillery fire, which hit a wedding party.
Image copyrightAFPImage caption Most of those fleeing the fighting are reported to have arrived at the Bab al-Salam border crossing
At least 15,000 Syrian refugees fleeing fighting in northern Aleppo province have gathered at a border crossing with Turkey, UN and Turkish officials said.
The frontier is shut but Turkey has said it is prepared to feed and shelter the refugees.
In the past few days, the Syrian army backed by Russian air power has made a series of gains in Aleppo province.
The advance threatens to encircle the city of Aleppo, Syria's largest, landing a major blow to the rebels.
Nato has accused Russia of "undermining" Syrian peace efforts through its strikes, which it says are mainly aimed at opposition groups.
But Russia insists it only targets what it calls terrorists.
On Friday, Turkish President Recep Tayyip Erdogan accused Russia of being engaged in an "invasion" of Syria, saying it was trying to create a "boutique state" for President Bashar al-Assad, an ally of the Kremlin.
Mr Erdogan said Russia and the Syrian government were together responsible for 400,000 deaths in Syria.
Turkey and Russia have been embroiled in a row since Turkey shot down a Russian jet it accused of violating its airspace in November.
Media captionSyrians have fled Aleppo following air strikes, says Paul AdamsAccording to the UN, up to 20,000 Syrians have gathered at the Bab al-Salam border crossing.
"Humanitarian organisations are responding to the needs of those displaced, but ongoing military conflict is making access to populations in need increasingly difficult," the UN's Linda Tom told the AFP news agency.
She said another 5,000-10,000 displaced people had gathered at Azaz, a north-western Syrian city close to the Turkish frontier.
The Syrian war and Aleppo
March 2011: Anti-government protests erupt across Syria, but Aleppo is initially untouched due to a state crackdown February 2012: As the rebellion turns into a conflict, clashes between rebels and the government are reported with increasing frequency in Aleppo province July 2012: The battle for Aleppo begins. Rebels make swift advances, but are unable to consolidate their gains and the city becomes divided 2013: The government begins bombarding rebel districts with barrel bombs, causing thousands of casualties September 2015: Syria launches a fresh offensive in the wake of Russia's intervention in the conflict February 2016: The government captures towns north of Aleppo, threatening to encircle the city Aleppo profile
Separately, Turkish Prime Minister Ahmet Davutoglu said 15,000 people had arrived at the border.
In a televised speech, he said Turkey would not leave them "without food or shelter" but would not say if they would be allowed in. Image copyrightAFPImage caption Thousands are seeking to escape the fighting in Aleppo, which has escalated in the past few days Image copyrightAFPImage caption Turkey said it would provide for the refugees, but the crossing is shut Image copyrightAFPImage caption The UN warns that ongoing fighting is making providing aid "increasingly difficult" Friday saw further gains for the Syrian government on the ground, recapturing the town of Ratyan, north of Aleppo.
Earlier in the week, it claimed a major victory by breaking the rebel siege of two towns in Aleppo province, severing an opposition supply line from Turkey to Aleppo city.
"It feels like a siege of Aleppo is about to begin," said a spokesman for aid group Mercy Corps, David Evans, who said the main humanitarian route was cut off.
Since 2012, Aleppo has been divided into rebel and government-held areas. Before the conflict it was a key commercial centre and home to over two million people.
What is the Syria conflict?
Image copyrightAPWhy is there a war in Syria?
Anti-government protests developed into a civil war that, four years on, has ground to a stalemate, with the Assad government, the so-called Islamic State group, an array of Syrian rebels and Kurdish fighters all holding territory. Who is fighting whom?
Government forces concentrated in Damascus and the centre and west of Syria are fighting the jihadists of Islamic State and al-Nusra Front, as well as less numerous so-called "moderate" rebel groups, which are strongest in the north and east. These groups are also battling each other.
What's the human cost?
More than 250,000 Syrians have been killed and a million injured. Some 11 million others have been forced from their homes, of whom four million have fled abroad - including growing numbers who are making the dangerous journey to Europe. How has the world reacted?
Iran, Russia and Lebanon's Hezbollah movement are propping up the Alawite-led Assad government, while Turkey, Saudi Arabia and Qatar back the more moderate Sunni-dominated opposition, along with the US, UK and France. Hezbollah and Iran are believed to have troops and officers on the ground, while a Western-led coalition and Russia are carrying out air strikes.