The New Year’s-eve attack on an Istanbul nightclub that killed at least 39 people, mostly foreigners including two Indians, is yet another reminder of the rapidly deteriorating security situation in Turkey. 

Why is Turkey being repeatedly targeted?

Syria policy of Turkish president Recep Tayyip Erdogan:
1. Like many of his Western allies, Mr. Erdogan also initially though  that Syrian President Bashar al-Assad was about to fall, and offered help to the anti-regime rebels.

2. Ankara also inadvertently helped the rise of the IS by allowing jihadists to cross into Syria via the Turkish border. By the time the government realised its folly and started attacking the IS, the group had grown into a real terror machine.

3. Mr. Erdogan’s decision to relaunch the war with Kurdish rebels. When the rebels started building an autonomous Kurdistan in Syria in the wake of the government’s withdrawal from the border and emerged as battlefield allies of the U.S. against the IS, Mr. Erdogan saw it as a long-term challenge to Turkey, given the long history of fighting between the Turkish state and the Kurdish militants. 

He abandoned a ceasefire with the Kurdistan Workers Party, kicking off a new phase of the civil war. 

Present threats:
1.The country faces constant threats from the IS, a group that it once ignored. 

2.The civil war with Kurdish rebels, which Mr. Erdogan might have hoped would curtail the nationalist ambitions of the Kurdish minority, is growing out of control. 

3.Mr. Erdogan’s authoritarian tendencies and the crackdown on dissent and opposition parties are deeply polarising the country. 
It is this fragility of the security architecture in Turkey that is frequently being exposed by the attackers.