Islamic State militants seized five villages from Syrian rebels close to the Turkish border Wednesday, further weakening the rebels' foothold in and around the northern city of Aleppo.

The Britain-based Syrian Observatory for Human Rights, a network of activists monitoring the conflict, said the extremist group took five villages in Azaz district, north of Aleppo, where a rebel enclave is home to tens of thousands of displaced civilians. ISIS' news agency also reported the advance.

Syrian rebels are anticipating a major government offensive in Aleppo, Syria's largest city and onetime commercial capital, which has been contested since 2012. Dozens of civilians have been killed in shelling and airstrikes on the city over the past week.

In another blow to the rebels, government troops repelled an attack on the western edge of Aleppo by a coalition of insurgent groups, killing at least 19 fighters, said Nazeer al-Khatib, an Aleppo-based activist who keeps close contact with the insurgents.

Al-Khatib said the rebels were ambushed by government forces near a factory, trapping nearly 600 fighters inside. Nine rebels were killed in the clashes, while another 10 died during an operation that succeeded in freeing the trapped fighters but failed to dislodge government forces from the area.

The Observatory also reported the failed attack, but put the number of rebels killed at 34.

A pro-government TV station also reported that troops had repelled an attempt by insurgents to crawl up the city's sewage system in a western neighborhood. The Sama TV station aired footage of the bodies of nearly a dozen fighters.

A government offensive backed by Russian air power and regional militias earlier this year dislodged rebels from parts of Azaz and severed their corridor between the Turkish border and Aleppo. The predominantly Kurdish Syrian Democratic Forces (SDF), who are fighting for their autonomy in the multilayered conflict, also gained ground against the rebels.

That left the rebels in Aleppo with just one narrow corridor to the outside world, through Idlib province. Those in Azaz are now squeezed between ISIS to the east and the SDF to the west and south, while Turkey tightly restricts the flow of goods and people through the border.

Doctors Without Borders and other aid organizations warned earlier this month that the humanitarian situation for over 100,000 people trapped in the Azaz rebel-held pocket was critical.

Wednesday's advance puts ISIS in a better position to strike the towns of Marea and Azaz.

Syria's conflict began with mostly peaceful protests in 2011, but a brutal government crackdown and the rise of an armed insurgency eventually plunged the country into a full-blown civil war. The fighting has killed more than 250,000 people, according to the United Nations, which stopped tracking casualties several months ago.

Despite the wobbly cease-fire, humanitarian aid was delivered to a rebel-held area in central Syria, the third such batch since last week. The International Committee of the Red Cross said it is delivering to the besieged town of Talbiseh about 35 trucks carrying food parcels, technical equipment to repair boreholes and pumping stations, dialysis machines, school kits and other materials.

Talbiseh has seen its population nearly double since September to 60,000 because of the escalation in fighting in areas nearby.

On Friday and Monday, the ICRC, alongside the U.N. and the Syrian Red Crescent, delivered aid to another besieged town in the central Homs province.