Today, as evidenced by surveys measuring expected support for Erdogan in the referendum, Turkey is about evenly split between pro- and anti-Erdogan factions: the former, a conservative right-wing coalition, believes that Turkey is a paradise; the latter, a loose group of leftists, secularists, liberals, Alevis (liberal Muslims), and Kurds, think they live in hell.

For years, Turkey’s vaunted national-security institutions, including the military and the police, had helped the country navigate its perilous political fissures, first in the civil war-like street clashes pitting the left against the right in the 1970s, and later in the full-blown Kurdish nationalist insurgency and terror attacks led by the PKK in the 1990s. However illiberal and brutal their methods, including several coups d’état and police crackdowns, the military and police kept Turkey from imploding. But this has changed since Erdogan’s unprecedented purge of the security services in the aftermath of the failed coup of July 15.

At the same time, Turkey’s involvement in the Syrian civil war is having unexpected, destabilizing repercussions back home, which are also severely undermining the country’s ability to withstand societal polarization. Ankara has sought to oust the Assad regime since the outbreak of civil war in Syria in 2011. After sending troops into northern Syria in August 2016, Turkey has also conducted military operations against both ISIS and the Kurdish Party for Democratic Unity (PYD). Accordingly, Ankara now has the distinction of being hated by all major parties in the Syrian civil war—Assad, ISIS, and the Kurds. Syria will no doubt continue trying to punish Turkish citizens for their country’s actions: Turkey has blamed the Assad regime for a 2013 set of car bombings in Reyhanli, in the south of Turkey, that killed 51 people, though the Syrian government denied involvement.

Erdogan’s Syria policy is also a driver of ISIS and PKK terror attacks in Turkey. Each time Ankara makes a gain against the PYD in Syria, the PKK targets Turkey. And each ISIS attack in Turkey similarly seems to be a direct response to a Turkish attack against jihadists across the border. For instance, the June 2016 ISIS attack on the Istanbul airport, which killed 45 people, occurred just after Ankara’s Syrian-Arab proxies took territory from the terrorist group. The New Year’s Eve attack on an Istanbul nightclub that claimed at least 39 victims came just as Turkey-backed forces launched a campaign to take the strategic Syrian city of al-Bab from ISIS.

ISIS and the PKK represent the extremes of Turkey’s two halves, each intent on widening the country’s political chasm—a chasm that, in turn, prevents the country from holding a candid debate on its Syria policy, and that policy’s impact on domestic security. Consider ISIS’s chosen targets: venues like the nightclub, frequented by secular and liberal Turks; foreign tourists, who have been targeted in multiple attacks in Istanbul; Kurds and leftists like those killed in a July 2015 twin suicide bombing in the Turkish border town of Suruc; as well as liberal Muslim sects like the Alevis, a key bloc in the anti-Erdogan opposition and the main victims in the most devastating ISIS attack in Turkey to date, which killed 103 people at a peace rally in Ankara in October 2015.