Shifting frontlines and allegiances in Syria are making it difficult to respond to the growing humanitarian crisis triggered by Turkey’s offensive on Kurdish-controlled parts of the country, aid groups have said.

After eight days of the Turkish operation about 300,000 people have been displaced from their homes and at least 71 people killed in north-east Syria, according to the UN and a human rights monitor. Local officials on Thursday put the number of dead at 231. Over the border in Turkey, 20 civilians have been killed in counterattacks.

The Syrian towns of Ras al-Ayn and Tel Abyad, the two main targets of Turkish troops and their Syrian rebel allies, have emptied of people after a week of shelling, rocket attacks and ground clashes as the Kurdish-led Syrian Democratic Forces (SDF) fight back.

Roj hospital, Ras al-Ayn’s only medical facility, has reportedly been hit by heavy machine gun fire, two sources said. A medical worker at the facility died of his wounds on Thursday after being injured in shelling several days ago.

The International Rescue Committee (IRC) said an apparent airstrike hit a “trauma stabilisation point” run by a local organisation and that two of the group’s ambulances were damaged despite being clearly marked. It said its ambulances were being fired on every time they approached Ras al-Ayn, preventing them from reaching the town.

People leave an area near the Syrian Kurdish town of Ras al-Ayn. Photograph: Delil Souleiman/AFP via Getty Images

Unable to guarantee its employees’ safety, IRC and many other aid agencies have suspended operations and removed staff from the area.

Some are still operating away from the frontline, but as Syrian government forces move in under the terms of a deal between the SDF and the Syrian president, Bashar al-Assad, many of the biggest international aid providers will have to withdraw because they are not registered in Damascus.

“There will be a huge impact on where we’re able to access in the north-east,” said Sonia Khush, the Syria response director at Save the Children. “We have to leave as the battle lines change.”

Turkey launched Operation Peace Spring last Wednesday after Donald Trump announced the withdrawal of US troops from the area, effectively removing the buffer stopping the two forces from clashing. The Turkish president, Recep Tayyip Erdoğan, has long maintained the SDF is indistinguishable from Turkey’s militant Kurdistan Workers’ party (PKK).

Quick Guide What is happening in north-eastern Syria? Show Who is in control in north-eastern Syria? Until Turkey launched its offensive there on 9 October, the region was controlled by the Syrian Democratic Forces (SDF), which comprises militia groups representing a range of ethnicities, though its backbone is Kurdish. Since the Turkish incursion, the SDF has lost much of its territory and appears to be losing its grip on key cities. On 13 October, Kurdish leaders agreed to allow Syrian regime forces to enter some cities to protect them from being captured by Turkey and its allies. The deal effectively hands over control of huge swathes of the region to Damascus. That leaves north-eastern Syria divided between Syrian regime forces, Syrian opposition militia and their Turkish allies, and areas still held by the SDF – for now. On 17 October Turkish president, Recep Tayyip Erdoğan, agreed with US vice-president Mike Pence, to suspend Ankara’s operation for five days in order to allow Kurdish troops to withdraw. The following week, on 22 October, Erdoğan and his Russian counterpart, Vladimir Putin agreed on the parameters of the proposed Turkish “safe zone” in Syria. How did the SDF come to control the region? Before the SDF was formed in 2015, the Kurds had created their own militias who mobilised during the Syrian civil war to defend Kurdish cities and villages and carve out what they hoped would eventually at least become a semi-autonomous province. In late 2014, the Kurds were struggling to fend off an Islamic State siege of Kobane, a major city under their control. With US support, including arms and airstrikes, the Kurds managed to beat back Isis and went on to win a string of victories against the radical militant group. Along the way the fighters absorbed non-Kurdish groups, changed their name to the SDF and grew to include 60,000 soldiers. Why does Turkey oppose the Kurds? For years, Turkey has watched the growing ties between the US and SDF with alarm. Significant numbers of the Kurds in the SDF were also members of the People’s Protection Units (YPG), an offshoot of the Kurdistan Workers’ party (PKK) that has fought an insurgency against the Turkish state for more than 35 years in which as many as 40,000 people have died. The PKK initially called for independence and now demands greater autonomy for Kurds inside Turkey. Turkey claims the PKK has continued to wage war on the Turkish state, even as it has assisted in the fight against Isis. The PKK is listed as a terrorist group by Turkey, the US, the UK, Nato and others and this has proved awkward for the US and its allies, who have chosen to downplay the SDF’s links to the PKK, preferring to focus on their shared objective of defeating Isis. What are Turkey’s objectives on its southern border? Turkey aims firstly to push the SDF away from its border, creating a 20-mile (32km) buffer zone that would have been jointly patrolled by Turkish and US troops until Trump’s recent announcement that American soldiers would withdraw from the region. Erdoğan has also said he would seek to relocate more than 1 million Syrian refugees in this “safe zone”, both removing them from his country (where their presence has started to create a backlash) and complicating the demographic mix in what he fears could become an autonomous Kurdish state on his border. How would a Turkish incursion impact on Isis? Nearly 11,000 Isis fighters, including almost 2,000 foreigners, and tens of thousands of their wives and children, are being held in detention camps and hastily fortified prisons across north-eastern Syria. SDF leaders have warned they cannot guarantee the security of these prisoners if they are forced to redeploy their forces to the frontlines of a war against Turkey. They also fear Isis could use the chaos of war to mount attacks to free their fighters or reclaim territory.

On 11 October, it was reported that at least five detained Isis fighters had escaped a prison in the region. Two days later, 750 foreign women affiliated to Isis and their children managed to break out of a secure annex in the Ain Issa camp for displaced people, according to SDF officials. It is unclear which detention sites the SDF still controls and the status of the prisoners inside. Michael Safi

The offensive has been met with international condemnation for opening a new front in Syria’s complex war and risking the return of Islamic State, which the SDF, with help from its US patrons, finally defeated in March. The US president has been heavily criticised for what allies and foes alike have deemed his betrayal of a loyal military partner.

An array of armies are scrambling for control of key towns and roads after the SDF reached a deal with the Syrian regime, their former opponents, for military backup to defend against Turkey. US troops have pulled out, Russian forces allied to Assad have moved in, and in the chaos at least seven men and 750 women and children with links to Isis have escaped from detention centres and prisons in three separate breakouts.

Civilians have mostly fled south, away from the scope of Turkey’s proposed 20-mile (32km) deep “safe zone” on its border. Many have ended up crowding the floors of relatives’ houses and approximately 40 schools are now emergency shelters.

Others have gone east to Semalka, the area’s only international border crossing, which joins north-east Syria to Kurdish-controlled northern Iraq. Officials said almost 1,000 Syrian Kurds had entered the area since the launch of the Turkish operation, but many are camped out without papers or permission to cross.

Iraqi Kurdistan, where thousands of people are still in displacement camps after fleeing Isis’s advance in 2014, is reticent about taking more refugees.

“Where can we go except here?” Omar Boobe Hose, a refugee from Ras al-Ayn, said to Agence France-Presse. “We can’t go to Turkey, because they are our enemy, and the other side is also our enemy, the Syrian [government] side. Where can we go? We have only here. There are no other places for Kurds.”

Erdoğan has vowed to push on with creating the border safe zone. The US vice-president, Mike Pence, and the secretary of state, Mike Pompeo, met with the Turkish president in Ankara on Thursday to press for a ceasefire. Erdoğan will travel to Moscow on Tuesday to meet his Russian counterpart, Vladimir Putin.