When Syrian rebels seized the border post at Ras al-Ayn on Nov. 8, they celebrated the victory and went on to "liberate" the town, a place where both Arabs and Kurds live on Syria's northeast border with Turkey.
But the Kurdish inhabitants quickly saw their "liberation" as a disaster. Within days, dozens were dead in clashes between Kurdish militias and the rebels.
Many civilians in Ras al-Ayn fled to neighboring Turkey. Kurds on both sides of the border blamed the Turkish government for arming the rebels and backing the operation.
Ras al-Ayn was pitched into a crisis that threatened to open new and dangerous ethnic tensions between the mostly Arab rebels and Syria's Kurds. There are now jittery Kurdish towns and villages across northeastern Syria, where the minority Kurdish population is concentrated.
Now, there's a deal on the table to end the fighting between the rebels and the Kurds. The resolution could say a lot about how the revolt against President Bashar Assad's regime plays out in one strategic corner of the country.
"I make no predictions in what will happen," says analyst Joost Hiltermann, with the International Crisis Group and an expert on Kurdish politics. "These populations have lived side by side for a long time, but when you lift a lid off of a country, as the case in Syria, anything can happen."
The two rebel brigades that came to Ras al-Ayn are from the Salafist wing of Syria's armed groups. Both brigades, the Strangers of Damascus and the Al Nusra Front, are considered experienced fighters.
They quickly routed the Syrian army, but proved to be inept politicians when it came to dealing with the suspicious Kurds of Ras al-Ayn. The rebels immediately banned the Kurdish flag, reportedly burned down the local liquor shop — or smashed the bottles, depending on who is telling the story — and ordered the Kurdish militias to turn over their weapons.
The rebels also challenged Syria's most powerful Kurdish group, the Democratic Union Party, known as the PYD, which has tightened its control over many of Syria's Kurdish towns and villages as the Syrian regime's control has contracted.
Armed Kurdish reinforcements started pouring in to Ras al-Ayn. The PYD was not about to turn over the town to the rebels, a mostly Arab fighting force, and certainly not to Islamist militants.
For now, at least, the various factions seem to have pulled back from the brink of a full-scale confrontation.
According to sources who worked on the negotiations, the plan to resolve the conflict includes a 15-member civilian council for Ras al-Ayn, which includes four Arabs, six Kurds, and representatives of other minorities.
The rebels are slated to control the border post outside the city, but all armed groups will stay outside Ras al-Ayn. No weapons are allowed inside the town. There is a tense truce as both sides consider their options.
The civilians have been seen entering the city again, but mostly on quick trips to pick up whatever belongings they can carry. There is not enough trust yet to return to Ras al-Ayn.
Update at 6:50 p.m. The Rebels Gain Ground:
Speaking on All Things Considered, Deborah said that the rebels have made a series of gains in recent days, including the capture of an air base outside Aleppo, Syria's largest city, in the north of the country.
"The rebels are just getting more experienced, and you can just see that in the past week, capturing four bases," said Deborah, speaking from Gaziantep, Turkey, just across the border from Syria.
She crossed into northern Syria and interviewed a leading rebel comannder, Abed Jaber Ogedi, whose forces recently took the base near Aleppo.
"It's a big base, it's an elite base," the commander told Deborah, adding that it sits on the highway that connects Aleppo to Damascus. "This way we can block all the resupplies sent by the regime to Aleppo."
Deborah reported that the rebels, who have long complained about a shortage of weapons, now say they are getting sufficient supplies from the Syrian army bases they are capturing.
Copyright 2016 NPR. To see more, visit http://www.npr.org/.