Turkey’s strongman president, Recep Tayyip Erdoğan, rarely goes on the defensive. Yet in his first public appearance since the New Year’s Eve massacre in an Istanbul nightclub, he felt obliged to publicly reject the notion that his government’s intolerant approach to civil society could possibly have encouraged the attack claimed by Islamic State that left 39 people dead.

Erdoğan was speaking before a regular gathering of elected community leaders, an opportunity he usually uses to glad-hand political support.

However, the shock of the attack has further rent an already divided country. While no one believes that the government is directly responsible, it is accused of creating an atmosphere in which a religious fanatic could get away with murder.

“Nobody should be forced to share the same kind of lifestyle,” said Erdoğan, adding that if anyone had come under pressure to conform to an alien way of life it had been “this brother” – meaning himself.

Erdoğan’s rise from street urchin to inhabiting a palace that architects estimate to have cost more than £1bn has indeed been hardscrabble. In 1998 he was removed from office as mayor of Istanbul and briefly imprisoned for reciting a well-known nationalist poem which the prosecutor deemed “an incitement to violence and religious hatred”.

However, greater obstacles might lie ahead. The difficulties that are already facing Erdoğan’s Turkey hardly need rehearsing. A civil war across the Syrian border has led to an influx of what may be as many as three million refugees. A once booming economy is now ailing. In 2015 – in order to woo the nationalist vote – the government shredded its attempt to secure an agreement with dissident Kurds. On top of this, there is the debilitating drip, drip of terrorist incidents.

On Thursday, a courthouse in the Aegean city of Izmir came under attack, leaving two people dead along with two assailants who were believed to be Kurdish militants. A rocket assault on a police station in the Kurdish south-east of the country, also on New Year’s Eve, was sufficiently commonplace to go unreported.

The killing spree in the Reina nightclub, by contrast, is not something that Turkish society is likely to forget. Whether by chance or by design, the gunman, who is still at large, managed to aggravate the “us and them” faultline in Turkish society. Despite the president’s assurances, many Turks feel that their lifestyle is under siege.

“Are they going to carry on until we are all in little pieces?” asked the owner of one fashionable restaurant who, like many people in the public eye, now prefers to remain anonymous.

Reina is located in the shadow of the first Bosphorus bridge, the pinch point of last July’s failed military coup. Since then, Turkey has been under emergency rule in an attempt to root out what politicians describe as terrorist infiltration into the state. The government blames the followers of Fethullah Gülen, an Islamic preacher living in self-imposed exile in Pennsylvania.

While exact figures are hard to come by, there have been at least 120,000 dismissals of civil servants, and a third of these may now be under some form of detention – including two constitutional court judges.

After the Reina shootings, many are beginning to suspect that the government has been chasing the wrong enemy, or at least wonder whether those in charge of the purges are themselves to be trusted. The point was driven home in December when an off-duty policeman working as a presidential guard shot dead the Russian ambassador to Turkey in what he said was revenge for the brutal reconquest of Aleppo.

Ordinary people, including many government supporters, took to the streets last summer to persuade those behind the coup to step down. Even government opponents were outraged that some still believed you could take control of a G20 nation and Nato member by occupying a radio station. Within hours of the putsch, Istanbul’s Atatürk airport was open for commercial flights.

But if the country quickly returned to normal, it has been a new normal in which the president is much stronger but the country over which he rules has been weakened in ways that are still being played out. One consequence feared by many is that Erdoğan now relies entirely on his core supporters and has given up all pretence of being a “one nation” leader.

“Turkey no longer thinks in terms of left and right but secularist and Islamicist,” says Ayşe Öncü, professor emeritus of sociology at Istanbul’s Sabanci University.

The head of Turkey’s state-funded Presidency of Religious Affairs took the lead from the pulpit in demonising the celebration of new year and social media buzzed with staged lynchings of Father New Year – the Turkish equivalent of Santa Claus. When one German language school in Istanbul was forced to cancel its festivities, the daily Die Welt responded with a caricature of Erdoğan on its front page as the Grinch who stole Christmas.

One of those injured in the nightclub attack in Istanbul is rushed to hospital. Photograph: AP

For a Turkish newspaper to do the same would have been a reckless act of bravery. Underlying secularists’ concerns is the government’s eagerness to criminalise dissent. At least 140 journalists and writers are now behind bars amid a crackdown on the media since the coup. “Prison conditions are dire and no evidence of involvement in the coup has been provided against those held in pre-trial detention, either publicly or in private,” says Katie Morris, head of Europe and Central Asia for Article 19, the London-based freedom of expression advocates.

With little hope of redress in local courts, it is not surprising that victims are now applying to the European court of human rights, Morris says. One such applicant, the editor and novelist Ahmet Altan, has accused the government not of arresting people involved in the coup but those trying to investigate what really happened. He himself was arrested nearly four months ago but, according to his lawyers, so far there has been no indictment.

Whether European disapproval will have an impact is unclear. When the Justice and Development party (AKP) – which Erdoğan helped to found – came to power in the early 2000s, it advertised itself as proof that Islamic politics could come in from the cold. Rather than lead Turkey away from the west, it would make the country more democratic, more European, and better able to exercise a moderate leadership role on the world stage.

Fifteen years later Turkey seems more isolated than ever. This is partly a result of vacillations over Syria. At first Turkey was at loggerheads with Russia over Moscow’s support for President Bashar al-Assad, even coming under an economic embargo when, in 2015, a Turkish F-16 shot down a Russian jet. Now it argues with the US over a lack of air support in Syria as Turkish troops try to capture Islamic State strongholds before Syrian Kurdish fighters get there first. In a round of diplomatic sabre-rattling last week, it threatened to expel Nato forces from the key Mediterranean airbase in Īncirlik.

An increasingly dire human rights record has weakened the country’s international standing and diluted the sympathy which the government might have expected as victim of an attempted coup. As its influence wanes, Turkey has become a breeding ground for conjecture and conspiracy theories – where everyone else is to blame.

One pro-government newspaper morphed the mugshot of the man suspected of the nightclub assault into a photograph of Barack Obama.

Cold weather and bottlenecks in Turkey’s supply of natural gas forced power cuts at the end of 2016, but many secular Turks chose to believe the explanation that a spiteful government was trying to sabotage new year celebrations. Yet on Friday the minister of energy (and the president’s son-in-law) announced that the electrical grid had come under cyber-attacks originating in America.

Unlike Russia, which Erdoğan now courts, Turkey has no oil or natural resource which it can use to keep supporters loyal. Until now the AKP has relied on consumer confidence and building tunnels, bridges or a third Istanbul airport to keep its cronies happy and the economy well oiled. The shopping mall, as much as the mosque, has been the symbol of its era in power.

Now the streets are eerily empty. Even before the Reina massacre, the lira was under attack. The inflation rate is rising, growth is slowing and the markets are pushing up interest rates. “These are times when investors look for a strong policy response, but the political environment means that this is proving hard to deliver,” says Murat Üçer, economist at consultancy Global Source Partners.

Ever since the coup attempt, Turkey has been under a form of emergency law where the government can rule by decree. The president is now pressing for constitutional changes that would make these powers permanent.

“A democratic presidential system has checks and balances – this would be one-man rule,” says Ergun Özbudun, a professor of constitutional law who was asked by Erdoğan, then prime minister, to draw up a constitution in 2007.

However beleaguered Erdoğan might be, few expect him to back down. “You may dislike a thing while it is good for you, and you may love a thing while it is evil for you,” he said in a New Year message to his people – the implication being that, though they may view the new authoritarianism as a bitter pill, they will grow to love the taste.