This article was originally written for teleSUR English.

Tuesday’s terror attack on Istanbul’s Atatürk airport is but the latest incident in a long string of attacks that have rocked Turkey in the past year. The attack, which cost the lives of more than 40 people and left scores more wounded, serves as a stark reminder that Turkey’s “war on terror” is all but a complete failure.

In the wake of the attacks, Turkish Prime Minister Binali Yildirim suggested that “the evidence points towards Daesh,” using the Arab acronym for the so-called Islamic State (IS), while President Recep Tayyip Erdoğan added that “Turkey will continue its fight against all terrorist organizations at all costs until the end of terrorism.”

If PM Yildirim’s claims are correct – and the signs do point in that direction, despite the fact that IS has never claimed responsibility for a single attack on Turkish soil – it means that this is the eighth attack in Turkey in 18 months for which the Islamic State can be held responsible. A total of more than 200 people have lost their lives in these attacks – almost double the number of civilian casualties from bombings claimed by militant Kurdish organizations.

Despite the significance of these numbers, the government has thus far maintained a position that views Kurdish militants as the first and foremost threat to the country. Its ambiguous attitude towards IS, failing to wholeheartedly commit the necessary resources to combat the threat stemming from radical fundamentalists is now backfiring – and it is ordinary citizens who pay the cost.

The politics of immunity

Less than a week before Tuesday’s airport bombings the Turkish parliament passed a law that granted immunity to security forces engaged in anti-terror operations. Surprisingly, however, this new law is specifically designed to expand the powers of the military in their fight against Kurdish militants in the country’s southeast – not to facilitate a long overdue clampdown on IS cells in Turkey.

Another, somewhat related, law passed in parliament just one month earlier, when a majority in parliament voted to lift their own immunity. Albeit applicable across the board, this move is widely considered to be specifically targeting the representatives of the Peoples’ Democratic Party (HDP) – a leftist party with its roots in in the Kurdish freedom movement. The military is granted immunity, while lawmakers see theirs lifted; crimes are legalized, while free speech is being criminalized. If one was looking for a single dichotomy that explains Turkish politics today, well, here you have it.

Members of the HDP have been accused by the president and others of being the political wing of the PKK, the Kurdistan Workers’ Party, and of supporting and abetting terrorism. The lifting of the MPs’ immunity paves the way for their prosecution and removal from parliament, effectively cutting short all hopes for a political solution to the conflict between the Kurdish movement and the Turkish state that caused hundreds of thousands of people to abandon their homes, left thousands injured and hundreds killed in the past few months alone.

The stark contrast between, on the one hand, the government’s efforts to crack down on Kurdish efforts for cultural rights and regional autonomy, and, on the other, operations targeting individuals and groups linked to IS is telling. While tens of thousands of troops have been committed to fighting Kurdish militants, aspiring jihadists seeking to join IS were freely crossing the Turkish-Syrian border for years. When entire Kurdish towns were cut off from the outside world, placed under curfew and bombarded beyond recognition, the IS flag could be seen waving above Syrian towns on the border with Turkey, with its jihadist occupants occasionally joyfully saluting its northern neighbors across the fence.

Befriending old foes

Ever since the HDP booked a surprising victory at the June 2015 general elections, the party, its supporters and, in fact, the Kurds in general have changed in the eyes of the ruling AKP from being an electoral asset and a political bench warmer to Public Enemy No. 1.

Having lost their trust in the AKP’s previous promises to address the Kurdish question, Kurds both in- and outside the parliament have now become the key obstacle to the fulfillment of Erdoğan’s plans of introducing a presidential system. Realizing he lost the Kurdish vote after the June elections, the president instead opted to appeal to Turkey’s nationalist constituency and soon reignited the war with the PKK.

In the process, it was not just Turkish nationalists who were suddenly bathing in the bright light of the AKP’s attention; another party was also brought back into the fold. As a bastion of the secularist Kemalist ideology, the Turkish armed forces had previously born the brunt of the AKP elbowing its way to power when it attempted to curb the party’s growing influence because it perceived the Islamists’ ambitions as a threat to the secular character of the Republic.

In two subsequent politically motivated mega–trials the AKP cleared the top military brass of dissidents, sending many generals and their subordinates off to serve long terms in prison. Fast-forward several years and the verdicts that once saw generals locked away to serve multiple life sentences are suddenly declared null and void. Now that the AKP has grown powerful enough not to fear the army any longer, it recognizes that in the Kurds the party and the military share a common enemy and that it might be worth forging a pragmatic alliance with its former nemesis.

Both the military and the AKP perceive the Kurdish movement as a bigger threat than IS: the military fears that Kurdish ambitions for regional autonomy threatens the integrity and longevity of the Turkish Republic, while the AKP is not just angered by Kurdish opposition to the presidential system, but also scared by the fact that the Kurds actually have an alternative to bring to the table, a decentralized, bottom-up governing system known as democratic confederalism.

Bringing IS to its knees

In its quest to oppose any Kurdish aspirations towards local self-rule, regional autonomy or equal citizenship rights, the Turkish government under President Erdoğan has allowed for IS to grow, gain strength and become increasingly bold. Now that Turkey, under pressure from its international allies, closed down the so-called “jihadi highway” and limits its support to Islamic fundamentalist groups fighting the Syrian regime, it suddenly faces the wrath of a monster it can no longer control.

As long as the Turkish government continues to treat its Kurdish citizens as a more serious threat to the future of the country than the terrorists of the so-called Islamic State, the deadly violence, the cowardly bombings and the vile attacks like the one on Istanbul’s airport will continue. If, however, the government decides to listen to the demands of the Kurds, stops criminalizing all those who speak up for peace, and enters into negotiations with the PKK, then there’s a realistic chance IS can be brought to its knees, both in Turkey and abroad.