Want smart analysis of the most important news in your inbox every weekday along with other global reads, interesting ideas and opinions to know? Sign up for the Today's WorldView newsletter.

Over the weekend, Turkey marked the one-year anniversary of a deadly coup attempt against President Recep Tayyip Erdogan and his elected government. You probably know the story: On July 15, 2016, a mutinous faction of soldiers staged a short-lived insurrection that was confronted by mass protests in Istanbul and elsewhere. More than 250 people were killed, including many civilians, and thousands injured before order was restored.

A year ago, I reported the aftermath from Istanbul. In a country known for its profoundly polarized politics, the events of July 15 had ushered in a remarkable period of unity. After decades of military interference in political life, Turks across the political spectrum seemed galvanized by their fellow citizens' defense of democracy. On Aug. 7, Erdogan even appeared at a gigantic rally with prominent figures of the opposition — including his biggest challenger, secularist Kemal Kilicdaroglu — in an unprecedented show of solidarity.

Today, whatever unity once existed is long gone. At events in Istanbul and Ankara commemorating the "martyrs" who perished, Erdogan thundered against his opponents at home and abroad.

"We will rip off the heads of those traitors," Erdogan said at a massive nationalist rally in Istanbul on Saturday, reiterating his desire to reinstate the death penalty. He then scolded Kilicdaroglu, who recently led a three-week protest march against Erdogan from Ankara to Istanbul.

"You should be ashamed of yourself," Erdogan said. "This nation is not a coward like you. This nation has a heart."

Turkish authorities pinned the attempted coup on Fethullah Gulen, a U.S.-based cleric who founded a global network of influential schools and charities but who is widely seen in Turkey as the mastermind of a subversive fifth column seeking to control the Turkish state. In an interview with NPR last week, Gulen again denied any involvement in the attempted coup.

The murky origins and circumstances of the putsch are still the subject of fevered debate, and Gulen's mooted extradition to his homeland seems nowhere in sight. Erdogan railed at Western governments for supposedly taking the side of his enemies and seeking to undermine Turkey.

"The stance of the European Union is clear to see ... 54 years have passed and they are still messing us about," he said in Ankara on Sunday, resuming his long-running feud with European leaders. "We will sort things out for ourselves. There's no other option."

Erdogan's government certainly has set about "sorting things out." Just days after he survived the coup attempt, Erdogan declared it "a gift from God" that would usher in "a new Turkey."

Since then, Erdogan has presided over a vast and astonishing purge of his country's state institutions and civil society. He and his allies say they are expunging supposed Gulenist plotters, but they are in reality targeting a much larger pool of dissidents, activists and other perceived adversaries.

Around 150,000 people were suspended or fired from their jobs in state institutions or universities. On Friday alone, news came of 7,000 more people dismissed from their posts, including 2,303 police officers and hundreds of academics. At least 50,000 people from the military, police, judiciary and other branches of government have been arrested. More than 100 journalists are behind bars. Dozens of newspapers and TV stations have been shut down.

Critics accuse Erdogan of laying the foundations of a one-party dictatorship, but his supporters say he is consolidating Turkish democracy. And so does he.

"Those who turned their weapons against innocent civilians on 15 July hit a brick wall made of a decade of progress in politics, economics, healthcare, justice, foreign policy and fundamental rights," Erdogan wrote in a column published by the Guardian. "This connection between the people and their government is the ultimate measure of our democracy’s resilience, and the strongest guarantee of its survival."

This year, Erdogan narrowly won a referendum that will transform the Turkish republic's political system from a parliamentary democracy to one dominated by a strong presidential executive. But his slim margin of victory led many analysts to predict that Erdogan will cling to his divisive populism to further cement his power.

Erdogan's fiery remarks in Istanbul this week were aimed at his base — politically conservative, religiously pious and increasingly nationalist Turks. A day prior, imams around Turkey delivered state-sanctioned sermons that connected those who died defending Erdogan's rule to the fighters killed in Turkey's war of independence after the collapse of the Ottoman Empire. The legacy of the coup attempt has "become an increasingly important political cudgel for the president and his Islamist supporters, with the victory over the coup plotters seen as a critical part of the government’s popular mandate," my colleague Kareem Fahim wrote.

"His narrative means that the rise of the Turkish nation and the future of the global Muslim community hinge on Erdogan as a person and a politician," said Soner Cagaptay, author of "The New Sultan: Erdogan and the Crisis of Modern Turkey," to the Financial Times. "The implication is that, if you don’t support Erdogan, you are neither a good Turk or a good Muslim."

As we've discussed before, Erdogan and his ruling Justice and Development Party were initially seen as forces of liberalization, unshackling Turkey's sclerotic economy and granting greater cultural freedoms to devout Muslims, ethnic Kurds and other communities long suppressed by Turkey's notoriously draconian secular state. But now, Erdogan's critics lament his repeated demonization of constituencies unlikely to vote for him or his party and the deepening polarization that is taking place under his watch.

"Labeling at least half of your population as 'terrorist' is not a defense of democracy," Kilicdaroglu wrote in a Guardian column opposing the Turkish president. "And concentrating power in the hands of one person without any checks or balances is an assault on the very notion of democracy."

Want smart analysis of the most important news in your inbox every weekday along with other global reads, interesting ideas and opinions to know? Sign up for the Today's WorldView newsletter.