Guillaume Briquet / AFP / Getty Images Center: A Turkish fighter of the jihadist group Al-Nusra Front, bearing the flag of Al-Qaeda on his jacket, holds position with fellow comrades on April 4, 2013 in the Syrian village of Aziza, on the southern outskirts of Aleppo.

Last Wednesday, when jihadi fighters from the Islamic State in Iraq and the Levant (ISIS) captured Azaz, a Syrian town barely four miles from the Turkish border, alarm bells sounded in Ankara, Brussels and Washington. An al-Qaeda franchise had just set up shop on NATO’s doorstep. But that was hardly the only flashpoint along the fractious Turkey-Syria border. About 170 miles east, jihadists have been laying siege to another key border crossing, Ras al-Ayn, for months.

For much of last week, according to local residents and opposition sources, fighters from Jabhat al-Nusra, ISIS, and other extremist groups – who control areas to the west and south of Ras al-Ayn – tried to tighten their stranglehold over the town by taking over a village just a few miles to its east. After days of intense clashes with a Kurdish militia, known as the People’s Defense Units (YPG), they retreated, leaving behind at least 39 dead, according to the Syrian Observatory for Human Rights. The YPG itself claims that the Islamists may have suffered hundreds of casualties.

For the al-Qaeda linked rebels, Ras al-Ayn is a major strategic prize. “Nusra wants to establish an Islamic emirate in [parts of Syria],” says Salih Muslim, the head of the Syria-based Democratic Union Party (PYD), the YPG’s political patron, but to do so “they need a connection with Turkey, roads, a way to bring in people and supplies from the outside world into Syria.” One of the best ways, he says, “is through the border in Ras al-Ayn.”

The Kurds, estimated to account for about for about 10 percent of Syria’s population, or more than 2 million, have largely remained on the sidelines of Syria’s civil war, keeping the rebels fighting the regime of Syrian President Bashar Assad at arm’s length. Although a group of Kurdish parties recently closed ranks with the Syrian Coalition, the main Western-backed opposition outfit, the overall picture remains muddled. The YPG, the most powerful Kurdish group on the ground, has repeatedly clashed with rebel factions — Free Syrian Army units and jihadists alike — for control of several border towns and parts of Aleppo. The PYD has made it clear, meanwhile, that it prefers to consolidate its recent gains in Kurdish-majority areas than to confront the regime head on. The Syrian rebels, as well as the Turkish government, have accused it of acting as Assad’s proxy.

Extremist groups have been attempting to wrest control of Ras al-Ayn from the YPG since last November, after Syrian authorities abandoned the area. On 17 July, the Kurdish militia expelled Nusra fighters and others from the western part of the city, pushing them to surrounding villages, and retook control of the border crossing with Turkey. Clashes on the outskirts of town have continued, however, with several hundred dead, mostly on the side of the extremist rebels.

The fighting, says Abdulhalim Sulaiman Abdulhalim, a local journalist, has brought Ras al-Ayn to its knees. “None of the state institutions are working, the phones aren’t working, there’s almost no trade,” he says, speaking via Skype. The town has always been poor, he says, but the situation has grown particularly dire since the clashes began last year. “Everything is four, five times more expensive. There’s bread, some of the bakeries are still open, but there’s no electricity. All the power lines have been destroyed or cut during the fighting.” What little power the town gets comes from fuel-fired generators. In a town that was home to about 60,000 Kurds, Arabs, and Christians before the war, “there are maybe 10,000 left,” reckons Abdulhalim. “They are living at the minimum level.”

The battles are also taking a toll on the Turkish side of the border. In neighboring Ceylanpinar, at least four Turkish civilians have died and dozens more have been wounded by stray bullets and shrapnel since July, when the last round of clashes erupted. Schools are routinely evacuated and locals often avoid staying outdoors.

According to Ras al-Ayn residents and Kurdish leaders who spoke with TIME, Turkey, which has become one of the staunchest advocates of regime change in Syria, is partially to blame for the bloodshed.

Armed Nusra men, says Abdulhalim, routinely cross into Syria unhindered. A local resident, Mohammed, contacted by phone, claimed to have seen videos and photographs of Nusra fighters killed in the recent clashes carrying Turkish national IDs. (According to intelligence reports cited by a Turkish newspaper, the rebels’ ranks may in fact contain as many as 500 Turkish citizens. Some of them are said to be former paramilitaries, so-called village guards, used by the Ankara government to fight homegrown Kurdish insurgents.) According to Salih Muslim, Turkey has given al Nusra free rein to attack YPG-controlled areas in northeast Syria so as to contain the rise of Kurdish self-rule in the region, which could prove contagious for Turkey’s own 12-15 million-strong Kurdish population.

Turkey once criticized the United States for labeling Jabhat al-Nusra a terrorist group, but has since changed tack, recognizing the group as a major menace. Turkish Foreign Minister Ahmet Davutoglu recently denounced the Islamist militants, noting that they did “as much harm to the just cause of the Syrian opposition as the regime itself.” Turkey denies having lent the group any support whatsoever.

With hundreds of rebel groups with opposing agendas, rival backers and shifting loyalties taking on the regime — and one another — across Syria, it’s become difficult of late to decipher how many wars are taking place in the country at once. The past week has only made things more complicated. Islamist fighters have begun to confront more moderate rebel factions. A number of FSA units have closed ranks with jihadi groups and broken with the Syrian Coalition, effectively cutting their lifeline to the West and leaving the Coalition more isolated than ever. With new fronts now opening up between the Kurds and the jihadists, and with tensions growing between the Kurdish factions themselves, more infighting may soon be in store. It will play to the benefit of only one side – that of Bashar Assad.