As Ankara approaches a crucial political moment, an insurgency threatens to spiral out of control in the country’s Kurdish regions.

By David KennerDavid Kenner is the Middle East editor at Foreign Policy. He is based in Beirut, Lebanon, and has been with FP since 2009 (a long time, he knows). He worked for FP previously in Cairo, where he covered the early days of the Arab Spring, and before that in Washington. He has attended Georgetown University and the American University of Beirut and has reported from Libya, Egypt, Gaza, Turkey, Lebanon, and Iraq.

DIYARBAKIR, Turkey — There’s no such thing as a quiet night in this southeastern city anymore. On an average night, residents say, police fire tear gas at Kurdish protesters and mark their chests with the red laser dots of sniper rifles; youths respond with firecrackers and sound bombs. On a bad night, residents go to sleep to the sounds of both sides exchanging gunfire and military helicopters buzzing overhead.

But some residents of Diyarbakir, the unofficial capital of the country’s Kurdish heartland, fear that the worst is yet to come.

“People are getting weapons, preparing for urban war,” said Brusk, 34, a prematurely gray-haired café owner in Diyarbakir. “They see it as protection from Huda-Par [a Kurdish Sunni Islamist movement] and other agents of the state.”

The long-dormant conflict between Kurds and the Turkish state has returned with a vengeance. According to a Turkish official, 39 Turkish police and soldiers have been killed in attacks by the outlawed Kurdistan Workers’ Party, or PKK, which fought a three-decade insurgency against the state but had been holding a cease-fire until the current spasm of violence, in the past month. Turkey, meanwhile, has also detained more than 1,000 Kurdish activists and begun a fierce air campaign against the PKK’s hideouts both inside Turkey and in northern Iraq, launching hundreds of air sorties that Turkish security officials claim have killed 390 PKK militants and wounded hundreds more.

The violence has flared up during a critical political moment for Turkey. Negotiations to form a coalition government collapsed on Monday, seemingly paving the way for an early election. The Justice and Development Party, or AKP, from which President Recep Tayyip Erdogan hails, failed for the first time since it came to power to win a majority of seats in the June parliamentary election — in a new vote, it will aim to regain its majority and form a single-party government. AKP officials have signaled that the snap election could be held in November.

Those in Diyarbakir hostile to the government accuse Erdogan of purposefully reigniting the Kurdish conflict as a cynical political ploy. They, along with some analysts, believe that Turkey’s harsh crackdown is a political strategy to win points among nationalist voters who despise any form of self-determination for the Kurdish minority. They believe that Erdogan is purposefully polarizing the electorate around the Kurdish issue — telling voters, essentially, that they’re either with him or with the terrorists.

“Until this early election, it is good for Erdogan if more women and soldiers die,” said Brusk.

Whatever sparked the current wave of violence, however, risks unleashing forces that no politician can control. Several Diyarbakir residents described how people in the city were increasingly arming themselves against what they see as out-of-control security forces and a government that uses the jihadis of the Islamic State and al-Nusra Front, an affiliate of al Qaeda, as a cudgel against the Kurds.

Imam Tascier, a parliamentary deputy for the pro-Kurdish Peoples’ Democratic Party, or HDP, from Diyarbakir, acknowledged citizens’ increased desire to arm themselves. Residents, he said, were driven by the fear not only of the government’s security forces, but also of the shadowy jihadi groups that they accuse the state of controlling.

“That’s why people say they want to get weapons — because, they say, we don’t know who is the enemy,” he said. “Now there are many [enemies]. But the final one responsible is the state.”

The price of weapons in Diyarbakir has soared in recent days, Brusk says. A Glock handgun that cost roughly $1,000 last year now costs $3,000, while a Kalashnikov rifle costs $2,000 (less than the handgun because it is harder to conceal, and anyone caught with such a weapon faces a lengthy jail sentence).

As the elections draw closer, there are signs that this incipient crisis might indeed be working to Erdogan’s political advantage. Two polls this month found that, if new elections were held immediately, the AKP would garner enough support to form a single-party government.

Both polls suggest that the AKP would gain votes at the expense of the HDP — a surprising result following the past two months of violence in the country’s majority Kurdish regions. But for AKP officials, it provides intellectual ammunition for their election strategy in potential early elections.

Muhammed Akar, the AKP chairman in Diyarbakir, blamed his party’s loss in the June elections on the decision of religiously conservative Kurds to vote for the HDP. These voters, he told Foreign Policy, were essentially looking for stability — they feared an outbreak of violence if the HDP did not pass the crucial 10-percent barrier for winning seats in parliament.

“Now I’m thinking that the religious Kurds who voted for the HDP regret their vote,” Akar said. “Because things didn’t get better when the HDP passed this election barrier — sadly, they became worse.”

And the solution to the current chaos, as Akar sees it, is to hand power back to his party. “If the AKP was in power alone, nobody could behave in this way,” he said. “Nobody would have the courage to fight against the state like this.”

But Akar and the AKP are going to have a fight on their hands as they try to win back their parliamentary majority. Their gains in the recent polls have been slim — well within the surveys’ margins of error — and a great deal can change in the three months before the likely vote. Meanwhile, Erdogan’s rivals are also marshaling their resources for the coming campaign.

“We are still in election mode,” said Tascier. “On [June] 7, the people went to the ballot box to vote. On the 8th, Erdogan indicated that there would be an election. So we’re ready.”

If the violence continues, however, nobody may win this political struggle in Turkey. Tascier, a Kurdish activist for four decades, still has a birdshot pellet lodged in his neck from when armed men sprayed him and two friends with gunfire in Diyarbakir in June 1993. He blames the gendarmerie intelligence unit known as JITEM, which was notorious for conducting extrajudicial executions during the height of the conflict with the Kurds in the 1990s, for the attack.

The incident is just one of many cautionary tales of how the surging violence could just as easily fragment the country, rather than unite it around any political party. During the wave of violence in the 1990s, the conflict between the state and the PKK morphed into a war that dragged in a bewildering array of state and criminal actors operating above the law. JITEM operated as such a force, while the interior minister hired an ultra-right-wing contract killer to do his dirty work. On the other side of the conflict, the PKK turned to the drug trade to finance itself, becoming entangled with international criminal networks and spawning splinter groups that attacked tourist destinations even as the PKK tried to adhere to a cease-fire.

The increasing weapons sales in Diyarbakir are one sign that the renewed conflict already threatens to drag in new actors. But if the conflict spirals out of control this time, residents and HDP officials in Diyarbakir agree, it will be even bloodier than in the past. The Kurds are now more organized than before and can call on support from Kurdish forces in Iraq and Syria that are vastly stronger than they were in the 1990s

“The Kurds are not the same Kurds as in the 1990s,” said Tascier. “They are not afraid, and they will keep their calm until they can keep it no longer…. Because people know that if there’s a war, it’s going to be everywhere in Turkey.”