GAZIANTEP, Turkey — The Kurdish refugees circled around me in Turkey on the edge of the so-called Islamic State, where part of Syria used to be. They were shouting with a mixture of fury and desperation about their families in Kobani, under siege just across the line. The border guards stopped their relatives from bringing in cars or sheep and left them in a no-man’s land. U.S. warplanes roaring overhead unleashed missiles and precision-guided bombs, but they could do nothing to solve this problem. Small-arms fire crackled close by and sounded as if it were getting closer.

Suddenly we heard the plopping sounds of tear gas canisters being fired, and we stumbled away in different directions, trying to escape the blue-gray choking fumes. Turkish gendarmes ran past me, shouting at the refugees to clear off, firing more canisters for good measure.

Dissent and complaints aren’t something welcomed in President Recep Tayyip Erdoğan’s Turkey, and in the weeks and months to come they are likely to be discouraged even more by a government whose reflexes are to lash out when challenged.

Certainly the Turkish Islamist government is being challenged now—with Kurds threatening revolt, liberals angry and critical, and NATO allies hardly able to contain their frustration at Erdoğan’s refusal to join the coalition against the militants of the Islamic State, widely known as ISIS or ISIL.

In a move that looks like the prelude to a more extensive crackdown on dissent in a country that appears less like a democracy with each passing day, Erdoğan’s government is now proposing new sinister security legislation. Prompted by last week’s Kurdish street protests that left nearly 40 dead, the new measures risk returning Turkey to the repressive policies pursued by the military junta that ruled the country after the 1980 coup.

Erdoğan’s instincts are to dig in when he’s under pressure, as he showed in his approach to the Gezi Park demonstrations last year, and he appears to be setting Turkey on course for a violent winter of discontent. But the Gezi Park protesters were starry-eyed idealists compared to the hardened Kurdish rebels and cadres who are every bit as provocative and stubborn as Erdoğan. The street battles of last week were a taste of things to come. And it is typical of Erdoğan’s security forces that in the meantime five foreign journalists manhandled by the police were arrested on charges of being “spies and provocateurs.”

In a package of proposals that have followed on quickly from Erdoğan’s vow last week to make protesters “pay dearly” for taking to the streets to protest inaction over Kobani, the government wants to give the police and courts sweeping powers. The move would reverse restrictions placed on the police passed only nine months ago to match European Union standards.

At the same time the government wants to limit suspects’ rights and “preemptively wiretap.” The restrictions include blocking defense attorneys from access to details of legal proceedings brought against their clients during investigations. Defense attorneys say the government appears determined to shroud police investigations in rules of secrecy so they can conduct witch hunts against opponents before a trial. Liberal critics worry the roll-back measures fail to distinguish between suspected terrorists and critics of government policy and dissenters.

“There is an attempt to shackle the most fundamental rights and individual freedoms by referring to recent provocations as an excuse,” says opposition politician Haluk Koç.

Mehmet Firat, one of the founders of Erdoğan’s ruling Justice and Development Party (AKP), who is now on the outs with Erdoğan, warns that the Turkish president’s muscular approach to dissent is to blame for the growing unrest: “When such massive demonstrations erupt, state officials should call for sobriety, and this task falls to those who are responsible for the managing the country.” Instead gasoline is being poured on the flames.

The government denies it is in the grip of pyromania. Complaints about the raft of security measures are dismissed. Numan Kurtulmuş, one of the AKP parliamentarians sponsoring the legislation, says the government has no wish to turn Turkey into a police state and rejects claims that the measures could be abused to suppress freedom of speech just as anti-terrorism laws were used at the height of the Kurdish conflict in the 1990s.

“The public should be relaxed; neither a return back to the police state will happen, nor will Turkey regress in regards to democratic improvements,” he told reporters. “We say ’yes’ to the use of democratic rights until the end. However, I suppose there is a need to say ‘no’ to turning streets into environment of terror under the guise of using democratic rights.”

Strong-arm tactics by Turkey’s gendarmes and local police have been on show since the Kobani siege began. Western journalists been blocked at times as they approached Turkish villages that face the Kobani battlefield. They’ve also been stopped from gaining access to Turkish hospitals where wounded fighters from the encircled town have been rushed. In some Kurdish towns the police have been trawling hotels demanding to know where Western journalists have been.

Gendarmes and police frequently out-number soldiers along the border near Kobani. On some days there have been more police water-cannon trucks and riot shields on show than tanks.

The army is in more of an aggressive posture in Kurdish towns in southeast Turkey than it is along a border that has Islamic militants fighting close by, giving the strong impression that Erdoğan’s government’s sees those Turks and Kurds who criticize its action—or inaction—as the real enemy.

As the refugees fled the teargas being fired at them, disrupting my interview with them, one stopped to remonstrate with the police, asking what they had done wrong. A young gendarme started to reply in Kurdish. His officer interrupted him: “Don’t speak in Kurdish to him, speak in Turkish,” he shouted before charging off to threaten refugees moving away too slowly.