Turkey says the YPG is an extension of the Kurdistan Workers Party (PKK), which has waged a three-decade insurgency in Turkey that has claimed more than 40,000 lives, mainly Kurdish.

On Saturday, Turkey began a cross-border operation, dubbed Olive Branch , in Syria’s Afrin province to prevent the US-backed People’s Protection Units (YPG) from consolidating territorial gains in northern Syria, convinced an autonomous Kurdish entity on its southern border would stoke violent separatism among its own, far larger Kurdish population.

Behind him, the television showed images from Kilis, a Turkish border town where shelling blamed on Kurdish forces hit a mosque , killing two people.

“The state has to fight terrorism at the root,” said Cengiz, 53, a retired hotel worker who did not give his last name. “Hopefully, it will end quickly and we won’t lose many soldiers. But we are prepared to pay the price.”

ISTANBUL — At a smoke-filled coffee shop in central Istanbul on Wednesday, customers kept one eye on their playing cards and another on a television broadcasting footage of the Turkish military’s incursion into northern Syria. To a man, the crowded room was unanimous in its approval of the operation aimed at thwarting Kurdish militants.

The Turkish Armed Forces said it has killed at least 287 militants in Afrin so far and reported three deaths from its own ranks.

Despite the loss of life, the campaign appears to have united Turks from disparate corners of a society polarized in recent years by a slew of bombings by the PKK and Islamic State (IS), a failed military coup and President Recep Tayyip Erdogan’s perceived arc toward authoritarianism.

Parliament’s second- and third-biggest parties, the center-left Republican People’s Party (CHP) and the far-right Nationalist Movement Party (MHP), both threw their weight behind the military’s cause, with CHP Chairman Kemal Kilicdaroglu, normally a bitter Erdogan critic, saying Turkey’s border security is a “national issue.”

A large majority of Turks believe the government is right to enter Syria to pursue Kurdish militants, said pollster Adil Gur, whose research firm A&G conducted a survey of public opinion that has not yet been published. He therefore would not give exact figures, but said support from Erdogan’s ruling Justice and Development Party (AKP) and MHP voters verged on 100%.

“Without this kind of support, the government would be unable to carry out such an operation,” he told Al-Monitor.

A survey by the ORC firm, which is said to be close to the government, showed 81% of Turks back Operation Olive Branch, with only 9% saying they oppose it.

Most Turks are outraged by a resurgent PKK, emboldened by the secular, Western-oriented YPG’s success on the Syrian battlefield, where it has proven itself the Pentagon’s most effective ally on the ground against IS — even though Washington labels the closely affiliated PKK a terrorist organization. Turks view the partnership as an American betrayal.

“Other countries, primarily the United States, have used Kurds to divide Turkey,” said Suat, a university student who also declined to give his last name. “The operation shows Turks are strong and won’t roll over.”

Ibrahim Kalin, a senior adviser to Erdogan, told the BBC, “The weaponry, the support, the training, the ammunition and all that they got from the US Army, they used them against Turkey. … Sometimes our public feels that NATO is not paying enough attention to Turkey’s legitimate security concerns.”

To be sure, authorities have acted quickly to put down resistance to the campaign at a time when emergency rule, imposed after the coup attempt, already allows Erdogan to rule largely by decree. Public demonstrations in the capital Ankara are banned until the Afrin mission is complete. Protests over the weekend were blocked in Istanbul and Izmir.

“Those who make the mistake and take to public squares will pay a heavy price. We will crush those who oppose us in this national struggle,” Erdogan said Jan. 21.

At least 150 people have been detained in the past week for social media posts criticizing Operation Olive Branch, according to news reports.

Sibel Hurtas, an Al-Monitor contributor, is among five journalists believed to be in custody. Her Twitter account showed only posts of her reporting on the conflict. Human rights activists have decried the crackdown, saying an anti-war movement is not criminal.

Only parliament’s left-wing Peoples’ Democratic Party (HDP), whose base is largely Kurdish, has opposed the operation, saying the AKP is “pumping society’s veins with violence” and that the government relies on conflict to retain power. HDP officials were among those detained in the wave of arrests.

The home of Sidki Zilan, a 50-year-old lawyer, former imam and conservative activist in Diyarbakir, Turkey’s largest Kurdish city, was raided on Monday and he was summoned to a prosecutor’s office on charges related to terrorism propaganda for his tweets.

“There are millions of people living in Afrin, now being bombed by 70 Turkish warplanes. … We should be able to cry for Afrin,” Zilan told Al-Monitor.

Elsewhere in Turkey, few seem to be shedding tears for Afrin. Even Istanbul’s normally taciturn Armenian and Jewish communities said prayers for the Turkish military.

Erdogan has vowed a “quick end” to Operation Olive Branch. Suat, the university student, said, “Erdogan is managing this well. All of Turkey, even his critics, has closed ranks behind him.”

Indeed, a swift, successful conclusion could give the president the boost he needs to pull forward parliamentary polls to later this year before his own re-election bid. Already, he has seen a slight lift in polls, A&G’s Gur said.

“A successful military operation could crown that. This operation was not undertaken for elections, but victory would certainly make elections easier,” he said.