On New Year’s Eve, the self-proclaimed Islamic State (ISIL) struck in Turkey once again, killing almost 40 people and wounding many others celebrating in an upscale nightclub in Istanbul. Unfortunately, this attack was neither the first of its kind, nor will it be the last.

Turkey is a prime target for ISIL for two main reasons. The first has to do with logistics and geography. It is simply easier for ISIL to launch attacks in Turkey than in Europe or the United States. Turkey has a 500-mile border with Syria that was loosely controlled for years, and has already absorbed millions of refugees from the Syrian civil war. Indeed, ISIL controlled key border crossings with Turkey until just a few months ago. It would be safe to assume that ISIL has installed numerous sleeper agents and cells in Turkey, from where it has steadily attracted fighters, to include possibly thousands of Turkish citizens. Second, Turkey launched Operation Euphrates Shield in Syria in August and is now the only country besides Syria and Iraq fighting ISIL with regular troops on the ground.

So, what is the strategic logic behind attacks in Turkey? What was ISIL trying to accomplish by hitting a trendy nightclub on New Year’s Eve? ISIL has a strong understanding of Turkey’s political cleavages and is, as I wrote after the Istanbul airport attack last June, directly targeting Turkey’s critical vulnerabilities: the country’s deep political divisions. It aims to further turn different segments of the society against one another.

In this context, neither the timing nor the location of the recent attack is random. Rather, both were meant to play on the tensions between secular and religiously conservative Turks.

The timing of the attacks is strategic two ways. First, New Year’s Eve celebrations have long been a source of tension between the secularists and conservative Muslims. Second, President Recep Tayyip Erdogan’s Justice and Democracy Party (AKP) and its followers have been systematically poking that wound in the past year, creating immediate incentives for ISIL to take advantage of the rising tensions over the issue.

So, what role do New Year’s Eve celebrations play in the secular-religious divide in the country? Put simply, secularists have long established a tradition of celebrating New Year’s Eve and some religiously conservative Turks and Islamists in particular frown upon and even condemn such practice, claiming that it is tantamount to celebrating Christmas, obviously a Christian undertaking.

Secularists often counter that Christmas is celebrated about a week before New Year’s Eve. Accordingly, so the argument goes, religious critics of this practice are either temporally confused or looking for an excuse to create tensions. This counter-argument, however, is partially misleading.

It is true that secular Turks do not celebrate Christmas per se. However, it is also true that New Year’s Eve celebrations in Turkey resemble “Christmas without Jesus:” On New Year’s Eve, secularists (and even many who would self-identify as conservatives) exchange gifts, tend to get together with family for a night-long feast, decorate a “New Year tree” (under which “New Year gifts” may be placed). Malls are filled with Santas in the weeks leading up to New Year’s Eve. Of course, the secular tradition has its own unique – at least, non-Christmas-like – characteristics too. These include playing bingo, watching a belly-dancer on TV, partying and/or drinking hard, and in some cases even giving red underwear to close family and friends (no joke!). Regardless, the Christmas-like tones of New Year’s Eve celebrations are robust enough to make many religiously conservative Turks and Islamists in particular feel offended.

So, where do these secular practices come from and why would religious conservatives feel offended? Modern Turkey was founded in 1923 on an extremely secular and secularizing vision. Mustafa Kemal Ataturk, who ruled the country until his death in 1938, envisioned a secular, Western-oriented, yet nationalist political identity for the “new Turks.” In his Westernizing efforts, Ataturk took some radical measures such as replacing the Arabic alphabet with a Latin alphabet as well as introducing the Gregorian calendar (on which we celebrate New Year’s Eve) in place of the traditional Islamic calendar. Under such circumstances, the way secularists celebrate this holiday fits the “secular, Western-oriented, yet nationalist” ideal: It is “in synch” with the West, without actually being Christian like it.

The secularizing founding fathers, however, failed to “convert” an overwhelmingly conservative society in its entirety. While around one quarter of the population can be roughly described as secular, around half is comprised of conservatives who felt oppressed under the rule of secularizing elites, which lasted from 1923 until Erdogan assumed power in 2002. For many conservatives, New Year’s Eve celebrations constituted an “imposed and foreign” (though not “foreign-imposed”) invented tradition.

Beyond this “big picture” narrative, there is the more immediate dynamic that makes the timing of the attack strategic: The AKP and its followers have taken an aggressive stance against New Year’s Eve celebrations in the past few months. Turkey’s Department of Religious Affairs, for example, issued a Friday sermon to be delivered across the country about the “illegitimacy” of such celebrations on December 30. The past few weeks also witnessed numerous related incidents, in which some Turkish Islamists went to extremes in “protesting” the holiday, even mock-pistol-whipping Santas in front of cameras, with no legal repercussion no matter how offensive or violence-provoking the act was. Related images were reflected in the media as examples of “Christian-o-phobia,” but the “protests” primarily targeted Turkey’s secularists.

The “place” of the particular target, the upscale nightclub Reina, also displays strategic acumen on the part of ISIL. Reina is a brand name, known for hosting Turkey’s “one percent” as well as well-to-do tourists, not to mention celebrities and star athletes. Depending on one’s perspective, Reina can be seen as a hub of decadence (for the filthy rich and famous), or the hottest place to party in town. ISIL was clearly banking on the idea that at least some religiously conservative Turks would respond to the attack by dismissing or even condoning it (secretly or openly) as an attack on not “them” but the decadent superrich who were in fact celebrating an “infidel” holiday by consuming alcohol.

Given this background, three mechanisms drive ISIL’s strategy over the New Year’s Eve attack. First, the attack plays on secularists’ fear and anger with respect to the recent anti-New Year’s Eve sentiment, motivating them to put the blame for the attacks on the AKP as well as radical Islamists whom they believe are “encouraged” by the AKP. The AKP’s recent discourse and actions demonizing or “delegitimizing” New Year’s Eve celebrations provide the basic material for this argument. Note that secularists are not merely concerned about their “right to party” — they increasingly feel that their entire “secular way of life” is being threatened by the AKP and its followers.

Second, ISIL may or may not have been right about how Turkey’s conservatives, broadly defined, would respond to the attack, but they were spot-on when regarding radicalized Islamists, some of whom cheered the attack on social media. Even though very few openly condoned the attacks, secularists have seized on that response to confirm their fears and anger as well as to accuse the AKP and the majority of conservatives of steering the country not only toward chaos and terror-ridden instability, but also sharia law.

The third mechanism is the most pressing one: a domestic security dilemma in which fear of the other will push both secularists and the AKP to employ more aggressive and polarizing discourses. This will likely create a feedback loop in which aggressive rhetoric fueled by existing fears will instigate fear and anger on the other side, deepening the confrontation between the secularists and conservatives.

Especially after the coup attempt in July, the AKP is operating in a state of paranoia and responds to any criticism harshly. Put bluntly, the Gezi Park protests of 2013 showed that secularists can mobilize en masse, which the AKP has feared ever since. An “imminent threat” to secularism could lead to another social upheaval by the secularists, which is the last thing AKP needs in these tumultuous days. The AKP will likely respond to this challenge through “preventive” measures, that is, by putting further pressure on the secularists and even denouncing some secular figures or groups as either “terrorist collaborators” or “pawns of outside powers who aim to ignite civil war.” Such measures will likely amplify secularists’ existent fears and anger, leading to further polarization in the country. The AKP will then respond even more harshly to real or imagined threats that secularists pose to its rule, and the cycle will continue.

In sum, ISIL is not only hitting specific, tangible targets in Turkey. It is hitting Turkey’s nerve centers, its fault lines in religious and political domains. Such attacks are doubly dangerous now, for the increasing political polarization in the aftermath of the failed coup attempt has already pushed Turkey to the closer to a breakdown.

If it wants to defeat ISIL’s strategy, Ankara needs not only a sound counter-terrorism strategy, but also a political strategy to ease the polarization as well as antagonism emerging between secularists and conservatives.

Burak Kadercan is an Assistant Professor of Strategy and Policy at the United States Naval War College. The views expressed here are his own and do not reflect those of the Naval War College, the Department of the Navy, the Department of Defense, or the U.S. government.