BEIRUT — Intense battles raged Thursday as Kurdish fighters attempted to repel a new advance by Turkish troops and allied Syrian fighters on their encircled enclave in northwestern Syria.

Meanwhile, Syrian government forces pushed into Idlib province, an opposition stronghold nearby, inching closer to a key highway that connects Syria’s two largest cities, Damascus and Aleppo.

The separate offensives have sharply worsened the humanitarian situation in northern Syria. Some 15,000 civilians have been displaced inside the Kurdish-controlled enclave of Afrin, with no place to run except the district’s center, according to U.N. humanitarian adviser Jan Egeland. The figure could not be independently verified.

The U.N. says more than 270,000 have been displaced in Idlib because of the government onslaught since Dec. 15.

Turkey has mobilized some 10,000 Syrian opposition fighters to fight in its campaign against a Kurdish militant group in Afrin. That campaign has drawn protest from the U.S. and France, which consider the Kurdish militia an ally in the war on Islamic State.

Turkey’s state-run Anadolu news agency said the Turkish military cleared Bulbul, an area north of Afrin, Thursday. But the Syrian Observatory for Human Rights said “crushing” battles were continuing with the Kurdish fighters.

A video emerged Thursday showing the mutilated body of a Kurdish female fighter as what appears to be Turkey-backed Syrian fighters mill around, mocking her and touching her chest.

On Thursday, Turkey’s military said Kurdish rebels have carried out two separate attacks against Turkish troops in Turkey and northern Iraq, killing at least three soldiers.

The military said rebels belonging to the outlawed Kurdistan Workers’ Party, or PKK, attacked Turkish troops stationed in northern Iraq on Thursday, killing two soldiers and wounding two others.

Another soldier was killed in an attack on his base near the town of Cukurca, in Turkey’s Hakkari province that borders Iraq, according to the military. Five other soldiers were wounded in that assault.

Meanwhile, Turkey took umbrage at remarks by French President Emmanuel Macron, who warned against an “invasion operation” of Afrin.

Turkish Foreign Minister Mevlut Cavusoglu called the warning an “insult” and said Thursday that France was in no position to “teach a lesson” to Turkey over its cross-border offensive, referring to past French military interventions in Algeria and other parts of Africa. Cavusoglu said France understood that Turkey was fighting “terrorists” and did not aim to invade Afrin.

Turkish officials said a rocket fired from Syria hit a restaurant in the Turkish border town Kilis on Thursday, injuring at least five people.