Syrian refugees
Syrians who fled their country stand behind the gate of a refugee camp near the Turkish border in Yayladagi. Reuters

ISTANBUL -- In an effort to stop the flow of extremist fighters back into Europe, Turkey, Bulgaria and Greece have rolled out measures to block Islamic State group members returning from Syria. Other countries in the Middle East are also closing their borders to Syrian refugees. As a consequence of those policies, hundreds of thousands of legitimate refugees from Syria have been stranded in Turkish camps. That situation is particularly dire for thousands of Palestinians who have suddenly found themselves in the middle of a battle between the militant group and Palestinian forces.

The Islamic State group, also known as ISIS or ISIL, attacked the 18,000-population Yarmouk refugee camp south of Damascus over the weekend, and now may control about half of it. That has forced almost 2,000 people living in Yarmouk to flee what used to be a safe place for Palestinians in Syria, in order to escape fighting and possibly living under the heel of the so-called caliphate. But they are now unable to cross into Jordan, Lebanon or Egypt. All three countries have banned Palestinians living in Syria from entering. And they can't go to Iraq, either, because ISIS controls swaths of the country there, too. The only option they had, at least until now, was Turkey.

“Never has the hour been more desperate in the Palestinian refugee camp of Yarmouk,” said the United Nations Relief and Works Agency for Palestine Refugees in the Near East (UNRWA) on its website Monday. “It is virtually impossible for civilians to leave Yarmouk as any attempt to move in the open brings high risk.”

The camp, to the south of downtown Damascus, has existed since 1957 and it houses the largest Palestinian community in Syria, with around 100,000 people. It has developed into a city neighborhood with concrete houses instead of the usual refugee tents.

The ISIS attack on the camp is not the first time Yarmouk has come under fire in the Syrian civil war. The regime of President Bashar Assad put the camp under siege in 2012, stopping humanitarian groups from delivering supplies and food to the residents living there. Doctors there said dozens died because of the siege, and Chris Gunness, a spokesman for UNRWA, says that with ISIS taking over the camp, many more are at risk of dying. The U.N. has not been able to deliver food convoys to those trapped inside.

The Palestinian Liberation Organization in Damascus has formed a "cell to handle this tragedy and they are trying to work it out with the least losses," said Palestinian Authority President Mahmoud Abbas, according to Al Jazeera.

Like Yarmouk, other cities in Syria are turning into places that people cannot escape.

The Turkish government closed two major border crossings with Syria last week, forcing thousands fleeing fighting and barrel bombs in Idlib, where the regime was bombing the northern city recently captured by rebels, to find safety elsewhere. Some Syrians tried to illegally cross into the country by paying smugglers, but more than 150 of them were caught by Turkish security forces.

Meanwhile, Greece and Bulgaria are ramping up their efforts to stop refugees from entering. In recent weeks dozens of Syrians have been arrested on the Turkish border of both countries. This week, Bulgaria announced that it would finish building its 100-mile fence bordering Turkey this September. The construction of the fence is part of a wider effort by the government to stop the flow of refugees. According to data from the Interior Ministry, about 18,000 Syrian refugees have entered the country over the past two years.

In Greece, dozens of refugees are found each day trying to cross the border from Turkey, most of them Syrian. According to figures from Greek customs, there are about 500,000 Syrians waiting in Turkey to cross into the country and therefore the European Union. But with the Greek economic crisis, the government has been forced to slow the process of allowing refugees to enter the country.

Among the factors contributing to the flow of refugees there is a renewed push against both the Assad regime and ISIS by rebel groups that have formed an alliance. The coalition of fighters, which call themselves Jaysh al-Fateh or "Army of Conquest" and are led by Jabhat al-Nusra, the al Qaeda offshoot in Syria, took Idlib last week and pushed the Syrian military out of the city. Jaysh al-Fateh is the only force currently trying to break into Yarmouk camp to fight ISIS. So far, though, the Jaysh al-Fateh efforts have not pushed ISIS out of the camp.