The turf battle between the YPG and Islamist extremists has been raging along the Turkish border for more than a year. It has taken mind-bending turns with ISIS fighting against other opposition fighters, including Jabhat al-Nusra, to win control over strategic border crossings with Turkey. Thus, the Arab farmer’s hamlet has changed hands between Jabhat al-Nusra and ISIS and is presently under YPG rule. The other big prize, the Rumeilan oil fields to the east of Serekaniye, are also for the most part in Kurdish hands. Whoever controls the oil fields and the borders controls the illegal fuel trade, which in turn helps finance the purchase of weapons and influence.

As YPG commanders ponder the dizzying gains of ISIS in neighboring Iraq — the group captured the city of Mosul on June 8 — an Arab farmer in a hamlet outside al-Tleiliye stiffens when approached by a journalist. He survived the bloodbath, but his brother did not. “I cannot say more,” he rasps, pulling an imaginary zipper over his mouth. He walks toward a concrete hut, its walls covered in a crude Arabic scrawl. “We have come to slaughter you. It's forbidden for Jabhat al-Nusra to approach,” it reads.

The jihadists shot dead 15 civilians, many as they slept outdoors, in what appears to have been a retaliatory attack against the YPG. One of the victims, Mohammed Mahmoud Hossain, was only a year old. All were Sunni Arabs, apparently mistaken for the village’s original occupants, Kurdish-speaking Yezidis, who are doubly targeted because of their syncretic faith.

Djvar Osman is a commander for the People’s Protection Units (YPG), the Kurdish militia that controls a band of mainly Kurdish-populated territory in northeastern Syria they call Rojava. We are in al-Tleiliye, a tiny village close to the Turkish border that was raided May 29 by the Islamic State of Iraq and al-Sham (ISIS).

AL-TLEILIYE, Syria — A raised metal bed stands in a yard. The stench of rotting flesh chokes the air. A man in fatigues points to traces of blood blotting the earth, saying, “Women, children, they murdered them in their sleep. They even killed the dog; that’s what causing the smell.”

On one recent morning, giant pillars of smoke billowed from outlying fields along the main road from Rumeilan to Aleppo, filling the air with acrid fumes. Men with blackened faces were producing their own oil from makeshift wells. “They are tribal Arabs. We keep telling them to stop this. It is ruining our crops and our health,” complains Welat Haj Ali, a former Kurdistan Workers Party (PKK) fighter and Rojava’s unofficial undersecretary for defense. “The biggest battle [against ISIS] was fought here, in these fields,” he says.

The YPG accuses Turkey of fanning the flames of the conflict, providing arms and sanctuary to ISIS and sealing its borders in an effort to quash the Kurds’ march toward self-rule. Turkey denies the accusations, describing ISIS as a terrorist group and a threat.

On June 9, Turkish officials said they were investigating claims that ISIS had kidnapped 28 Turkish truck drivers in Mosul. But the YPG’s tight links to the PKK, the Kurdish rebel group that has been fighting for self-rule in Turkey since 1984, renders them an even greater threat in Ankara’s eyes. There is little doubt that until recently, Turkey was allowing jihadist fighters to move unhindered across its borders.

In Michu, a deserted Arab hamlet on the edge of the front lines, Abdo Sino, a paunchy YPG commander, echoes the view that Turkey is complicit in the violence. He points to a cluster of cinder block houses lying just north of the YPG dugout. The village, al-Rawiya, is under ISIS control. Sino and his men had carried out a hit-and-run raid against al-Rawiya on May 27, killing eight ISIS fighters and prompting the revenge attack on al-Tleiliye. “Two Turkish ambulances picked up their wounded and carried them back to Turkey. We saw it all through our field glasses,” Sino claims.

Many of the ISIS fighters are Chechens and Azeris. Sino shows us pictures he took of the dead combatants with his mobile phone. They have pale white skin, long curly hair and unkempt beards. Next comes a well-thumbed pocket manual titled “The Muslims’ Citadel.” It is filled with Quranic verses exalting martyrdom and was printed in Azerbaijan. Sino says he found it in the pocket of one of the slain ISIS men.

YPG fighters in Michu are adamant that their ISIS foes continue to be allowed safe passage through Turkey. “We are going to bury [Turkish Prime Minister Recep Tayyip] Erdogan right here, in Rojava,” vows one young fighter. But the battle has reached a stalemate, and the finger of blame is shifting toward Damascus, a further sign of the fraying entente between President Bashar al-Assad and the Kurds.

This temporary peace was forged when the regime redeployed its troops from the Kurdish areas in summer 2012 to fight opposition forces elsewhere in the country — and some say to get back at Turkey for its unabashed campaign to topple Assad. The ensuing vacuum allowed the Kurds to share power, albeit symbolically, with Christian and Arab locals.

The Kurds’ overtures to minorities (they have allowed the Syriac Orthodox Christians to form their own battalion to defend themselves and to help fight al-Qaeda) and their policy of empowering women (about a third of the YPG’s fighting force is female) have won them fawning reviews in the Western media. But Western governments led by Washington continue to spurn contact with the Rojava administration because of pressure from Turkey, a NATO ally, but also because the Kurds refuse to take up arms against Assad. But for how long, a growing number ask.

Assad’s recent battlefield gains are prompting worries that his next move will be against the Kurds. Until such time, he is using ISIS to keep them in check, the Kurds claim.

“Why else is the Syrian army turning a blind eye to ISIS activities around areas under its control?” asked Salih Muslim, the co-chair of the Democratic Unity Party (PYD), the political arm of the YPG, in a recent interview with Al-Monitor. Such fears have prompted the Kurds to hedge their bets. Muslim confirmed that Rojava officials had initiated new talks with the Istanbul-based Syrian opposition to secure recognition of their fledgling administration.

He hopes that the recent trickle of US-funded aid through Kurdish-controlled northern Iraq will pave the way to formal contact with Washington.

Relations with Ankara are also showing signs of a thaw. Since March, Turkey has been allowing limited aid to be delivered twice a week through the Mursitpinar border gate to the YPG-controlled town of Kobane, under blockade by ISIS. And a new set of secret talks are reportedly underway between the PYD and Turkey’s national intelligence agency, MIT. These moves are closely bound up with Ankara’s peace negotiations with imprisoned PKK leader Abdullah Ocalan, who is widely revered in Rojava. Mohammed Kemal, the Rojava official in charge of press relations, told Al-Monitor, “We have been instructed from the top [by Ocalan] to stop talking about Turkey’s support for ISIS.” The news had apparently not yet filtered to the YPG fighters in Michu.

Western diplomats say it is likely that Turkey has helped ISIS and other jihadists in the past, but they dismiss claims of collusion between ISIS and the Syrian government. “We have no evidence to prove this,” said a senior Western diplomat based in Iraq. Either way, friction between the Kurds and the regime is on the rise. Sporadic clashes between the YPG and regime forces have been erupting with greater frequency, most recently near the Yarrubiya border crossing with Iraq. The Kurds’ refusal to allow voting in many towns during the presidential elections sharpened the government’s anger.

I got to witness the tensions firsthand in the Syrian Kurds’ putative capital, Qamishli, where the regime maintains a sizable presence. I recklessly decided to take pictures of a building surrounded by posts painted over with the Syrian flag. It proved to be the headquarters of the dreaded Syrian Mukhabarat, or national intelligence. Armed Syrian soldiers stopped us, demanding to know who I was. My YPG minder said I was a journalist who had come to cover the presidential elections. The soldiers were unswayed, and a tense standoff ensued. The encounter was threatening to blow up into a firefight when a reinforcement of pumped-up YPG fighters arrived on the scene. The Syrians backed down with these parting words: “Your days are numbered.”

Editor's Note: A previous version of this article stated that Kurds had allowed Assyrian Orthodox Christians to form their own battalion. The correct denomination is Syriac Orthodox Christians.