This will be remembered as the month when Turkey's elected regime crossed the moral red line into acts of genuine totalitarianism. It is a moment to back away from our close alliance with that regime.

Canada and its allies are relying on Turkey. Our military campaign in northern Iraq and Syria, to which Ottawa is contributing more than 800 trainers and special forces, would not function without the active co-operation, including access to military bases and border openings, provided by Turkey, a long-time fellow NATO member. And Turkey, which has received and is housing close to three million Syrian refugees, is seen as being vital in preventing the refugee flood into Europe from becoming less manageable – so vital that the European Union this week struck a deal in which the Turks, in exchange for reducing the refugee flow, will be given visa-free travel in Europe, billions in financing and a more direct pathway toward eventual EU membership.

Turkey, however, has become a problem. A really big problem. A week ago Friday, Turkish soldiers and police surrounded the offices of Zaman, the country's largest and by some measures best newspaper, fired tear gas, broke down the doors and seized control of the paper and its media empire with authorization from courts appointed by president Recep Tayyip Erdogan and his party. By Sunday morning, the paper, known for its independent-minded columnists, was publishing the most anodyne form of government propaganda.

Story continues below advertisement

This is bad enough in itself, but it is part of an unprecedented campaign to shut down or seize control of all forms of political, bureaucratic and media opposition – officially in the name of shutting down the Islamist and Kurdish movements. Mr. Erdogan claims they are security threats, but in practice, these crackdowns give him absolute executive power by eliminating all institutions of democratic and popular dissent.

That campaign went into high gear hours late last year after Mr. Erdogan's AKP (Justice and Development Party) won a majority in the Nov. 1 national election. The editors of the important moderate news magazine Nokta were imprisoned for "fomenting armed rebellion" – that is, for criticizing Mr. Erdogan's authoritarian approach. The most outspoken columnists in the newspaper Milliyet were fired or silenced. TV stations have been shut down.

More than 1,800 people have been arrested in the past year on charges of "insulting the president" – a law whose very existence is contradictory to democracy. Those imprisoned under it include the editor of the newspaper Birgun, who was found guilty of insulting Mr. Erdogan in an acrostic puzzle. And hundreds of government officials have been arrested or sacked on accusations that they are associated with the Islamist Gulen movement, which had brought Mr. Erdogan to power a decade and a half ago, but which he now opposes as a threat to his power.

Mr. Erdogan won November's election on a fear campaign aimed at Turkey's Kurds, who make up about a fifth of the country's population. The Kurdish-Turkish violence that drove those fears is entirely the creation of Mr. Erdogan, who abandoned his long and successful unity-building efforts in 2013 after Kurdish-led moderate political parties became popular with non-Kurdish Turks seeking a modern and European-minded alternative. They therefore became threats to his goal of gaining an absolute majority he could use to rewrite the Turkish constitution and make himself president for life.

Mr. Erdogan is now bombing his own citizens aggressively: The Kurdish-majority city of Diyarbakir has become a deadly place of bomb craters, house-to-house searches and seizures and late-night disappearances. Little of it has anything to do with actual threats to the Turkish state. As the British writer Christopher de Bellaigue recently observed of the Nov. 1 election: "Erdogan pulled off the classic politician's trick of successfully selling the panacea for an ailment largely of his own making."

Kurds in Syria and Iraq are our most important allies in Syria's civil war, and are key to finding a peaceful settlement to that conflict. By turning them into enemies strictly because they threatened his own grandiose political ambitions, Mr. Erdogan has destroyed the unified and open Turkey he earlier helped to create. And he has done so using the tools not just of authoritarianism but now, by silencing the media, of totalitarianism. It is time to stop treating Turkey as an ally, but as a country that has stepped beyond the pale.