The villages of Nubol and Zahraa in war-battered Aleppo province had been under siege by Al-Nusra Front, Al-Qaeda's Syria branch, and other Islamist rebels for a year and a half.
On Thursday, "Al-Nusra Front's fighters entered the villages on seven tanks", said the Syrian Observatory for Human Rights.
"It was a major, simultaneous attack," said the Britain-based group, which relies on a broad network of activists and doctors across the country for its reporting.
The National Defence Force, a pro-government militia, repelled the fighters with the Syrian air force providing cover, the monitor said, adding that the jihadists withdrew.
At least 25 people were killed, including 14 jihadists, it said.
Signup to our newsletter and follow us on Facebook and Twitter!
The jihadists left behind three tanks, the Observatory said quoting witnesses.
Al-Nusra Front had launched an offensive in November aimed at seizing Nubol and Zahraa.
The villages are the last regime bastions in the northwest of Aleppo province.
Syria's conflict began as a pro-democracy revolt that later morphed into a brutal civil war after President Bashar al-Assad's regime unleashed a brutal crackdown against dissent.
Through the course of the war, organisations such as Al-Nusra Front and the Islamic State group have emerged, seizing large swathes of territory across the country.
The Assad clan, which has ruled over Syria for more than 40 years, belongs to the Alawite community, a branch of Shiite Islam, while most of the rebels, like the population, are Sunni Muslims.