A cage in which Islamic State militants temporarily held people caught smoking while the militants held control of Tal Abyad, in Raqqa province. (Alice Martins/For The Washington Post)

When Islamic State fighters fled this northern Syrian town in June, they took with them the electricity generators, the water pumps, the hospital equipment and pretty much everything else that had helped sustain the semblance that they ran a functioning state.

They left behind their graffiti, their instruments of torture, the block of wood on which they beheaded their victims, the cage in which they punished smokers — and a community riven with suspicion and distrust.

Today, Tal Abyad is a tense and troubled place. Its new Kurdish masters are seeking to assert their control over a mixed town that, at least until recently, had an Arab majority — some of whom were not entirely unhappy to be governed by the Islamic State.

“As long as you didn’t bother them, they didn’t bother you,” said Sarkis Kaorkian, 60, who is one of the town’s few Christians who remained behind and is now deeply relieved the Islamic State is gone. He claims he drank and smoked his way through the group’s 17-month rule by staying out of their way and paying on time the $100 tax, or jizya, leveled twice a year on Christian residents.

These days, Islamic State sympathies abound among local Arabs in the town, say residents who close up their shops by nightfall, just in case. The assassination of a local imam outside his mosque this month reinforced their concerns.

Occasional suicide bombings keep Tal Abyad on edge, and recent attacks by Turkey underscore the kind of complications likely to arise as the U.S.-led effort to defeat the Islamic State liberates territory in Iraq and Syria — absent a wider settlement to the many rivalries fueling the region’s wars.

As the U.S. military prepares to deploy 50 Special Operations troops to the vicinity ahead of a new focus on the Islamic State’s self-styled capital of Raqqa, 60 miles to the south, Tal Abyad represents something of a test also for a strategy that will rely heavily on the Kurdish People’s Protection Units, or YPG, to take control of Arab areas.

Located on Syria’s border with Turkey, Tal Abyad is among the most strategically significant of the conquests made under the umbrella of the 14-month-old U.S. air campaign against the militants. The trading town had served as the Islamic State’s main gateway to the outside world, the transit point for foreign fighters arriving to join the group and for supplies of everything from Nutella to the fertilizers needed for making explosives.

Its fall within two days to the YPG represented a major defeat for the militants and has been held out by the U.S. military as a blueprint for future battles involving capable ground forces backed by U.S. airstrikes. The collapse followed two weeks of intense airstrikes against Islamic State positions in villages surrounding the town, and the group’s fighters appear to have chosen to flee rather than fight.

It was also, however, a significant setback for Turkey, which has vowed to prevent the establishment of a Kurdish region along its southern border with Syria. Turkey accuses the YPG of ties to Turkey’s domestic Kurdish separatist movement, the Kurdistan Workers’ Party, or PKK, which is designated a terrorist organization by Ankara and Washington.

Turkish soldiers on the other side of the heavily reinforced line opened fire this week on Kurdish positions in Tal Abyad on at least one occasion, a measure of the determination of Turkish President Recep Tayyip Erdogan “to do whatever is necessary” to push back against the Kurds’ expanding presence in Syria, as he put it earlier this month.

The border crossing, once one of the busiest between Turkey and Syria, has been sealed shut for months, hampering deliveries of food and humanitarian aid and further undermining Tal Abyad’s recovery.

It is against this backdrop that the Kurdish YPG has set about absorbing Tal Abyad into its self-declared Kurdish autonomous region, which now stretches more than 300 miles from the Iraqi border in the east to the banks of the Euphrates River in the west.

People walk past shuttered shops and a wedding gown on display in Tal Abyad, Syria. (Alice Martins/For The Washington Post)

Graffiti on the door of a shuttered store formerly selling Islamic State-approved products reads “ISIS fell, the whore state fell.” Next door, graffiti reads “Long-live Kurdistan.” (Alice Martins/For The Washington Post)

Few people are seen on the streets in an area with shuttered shops in Tal Abyad. (Alice Martins/For The Washington Post)

The Kurds formally renamed Tal Abyad with its Kurdish name, Gire Spi, and proclaim its new identity in signs throughout the town — written in the Latin script used by Turkish Kurds but not readily understood by Syrian Kurds or Arabs. They have also unilaterally detached it from the existing Syrian province of Raqqa and made it a part of their newly formed autonomous enclave, carved from areas traditionally inhabited by Kurds but steadily encroaching also on territories that were historically Arab.

The move has drawn condemnation from Turkey and from the Syrian opposition in exile, and revived long-standing disputes about whether Tal Abyad and its surroundings can be considered Arab or Kurdish lands. Though most records indicate Tal Abyad had a majority Arab population before the Syrian war, Kurds claim they were in the majority.

Children play “ISIS beheading" in a home in Akcakale, Turkey, where this family fled from their home in Tal Abyad, Syria, this year. (Alice Martins/For The Washington Post)

The Kurds are making an effort to embrace the local Arab population, and officials say they recognize they must. Hundreds of ­Arabs have been arrested, but most have been freed in return for making televised pledges of allegiance to the YPG, according to Ocalan Iso, the deputy defense minister for the area.

The YPG claims that as many as 30 percent of its fighters are Arab, and it has partnered in the area with a local unit of the Free Syrian Army. It is now working on empowering a larger Arab force to focus on the battle for Raqqa, YPG commanders say.

They have appointed a council to oversee the town. It is headed by an Arab and includes an Arab majority, as well as representatives of the minority Turkmen and Armenian communities.

Its president, Mansour Salloum, is a retired teacher who has remained in Tal Abyad throughout the four successive administrations that have governed it over the past four years, from the Syrian regime through the Free Syrian Army, the Islamic State and now the Kurds.

The regime was corrupt, the Free Syrian Army was corrupt, and under the Islamic State “it was like Hiroshima,” he said. With the arrival of the YPG, however, “now we have brotherhood and solidarity,” he said.

That remains in question, however. The slaying this month of Ammar Darwish, a moderate imam, as he sat in his store beside the mosque in the heart of the town was traced to an Arab resident of one of the nearby villages that was emptied and mostly destroyed during the fighting earlier this year. The killing came days after Darwish had appealed on Kurdish television for reconciliation between Arabs and Kurds, said his brother, Khaled, as he accepted condolences outside the family home.

“There are secret cells everywhere,” he said. “No one is safe from the Islamic State.”

Meanwhile, many of the tens of thousands of Arab residents who fled the advancing Kurdish force have not returned, for fear of retribution from the YPG. The YPG denied allegations this month by Amnesty International that it had forcibly displaced ­Arabs and destroyed Arab homes, including in the Tal Abyad area. But officials do not dispute that they have targeted for arrest those whom they believe cooperated with the Islamic State.

And many did, according to one of those who escaped and was interviewed in Turkey.

“We were happy” under the Islamic State, he said, asking not to be identified, for fear of retribution against his brother, who was detained when he sought to return to Tal Abyad and is still being held. He said the Islamic State restored law and order after the chaotic rule of the Syrian rebels, even though many local residents disagreed with their methods. “We couldn’t stay under the Kurds, because they burned houses and did bad things,” he said. “We will wait until Tal Abyad is liberated again, and then we will return.”

Salloum said there are now 40,000 people living in Tal Abyad and its surroundings, out of an original population of 75,000. And though the town has come back to life, it still has an empty feel.

Some of its shops are permanently shuttered, their owners having fled. The Islamic State’s distinctive black and white iconography remains, at abandoned checkpoints on the outskirts of town, in graffiti scrawled on the walls and on the railings of the central square where executions were held, a lingering reminder of the presence of the militants, still not so very far away.

Individual prison cells found inside a church allegedly used by Islamic State militants as a prison and school. (Alice Martins/For The Washington Post)

George, an Armenian Christian, stands inside the church he claims was used by Islamic State militants as a prison and school, where they allegedly conducted executions and torture of detainees. (Alice Martins/For The Washington Post)

Writings on a whiteboard found inside the church allegedly used by Islamic State militants as a prison and school. (Alice Martins/For The Washington Post)

Among those who have gone back are a trickle of Christians, 15 families from a community that once numbered 250, according to a group of them that gathers daily in the courtyard of the town’s burned and vandalized Church of the Cross.

The Islamic State turned the church into a security center where prisoners were tortured and military classes were taught by foreign fighters, according to Kaorkian, who lives next door and could see and hear the atrocities through his window.

A noose hangs in the vestry nearby, alongside the block of wood on which the condemned were beheaded. The courtyard’s fountain, now empty, was used for a form of torture resembling waterboarding, Kaorkian said. In the rooms used as classrooms, lessons are still inscribed on the board. One explains how to shoot down helicopters. Another illustrates how to make bombs.

The scorched ruins of the church now stand as a grim and ghostly reminder of the recent past.

Read more:

Diplomats look to overcome rifts in talks to ease Syrian strife

As talks on Syria begin, the future of Assad will be set aside — for now

Anti-Islamic State activist and his friend beheaded in Turkey