KILIS, Turkey — Two large Turkish flags, flattened by the rain, cover the blasted-out windows of the 17th-century mosque in Kilis, where a rocket fired by Kurdish militants in Syria slammed into the dome this week, killing two worshipers.
Even as the attack rattled shopkeepers gathered at a nearby tea shop, they voiced widespread support for Turkey’s new offensive against Kurdish militants in Syria.
“It makes Turkey strong,” said Mustafa Ozer, one of the group. “Now the border is much more robust. There is no threat anymore. This was mandatory and this should have been done earlier for the whole border.”
I came down to Kilis, which lies on the border with Syria, to learn more about the military operation and see what people directly affected by the war were saying.
President Recep Tayyip Erdogan of Turkey has secured broad political backing for his offensive into Syria. Barely a week old, it has already left five Turkish soldiers dead, but on Friday, Mr. Erdogan threatened to push all the way across Syria to the border with Iraq.
Mr. Erdogan faces the prospect of an election, possibly even this year, and he is relying on an offensive against the Kurds to fire up Turkish nationalism and his own conservative base. He has used similar tactics before.
Turkey, no doubt, has real security concerns along its long frontier with Syria, where it is now squarely at odds with the United States over American support of a Kurdish force trying to secure a vast area of northern and eastern Syria. Turkey’s government has long faced an insurgency from within the restive Kurdish population that straddles the border, so any bolstering of Kurdish military strength is anathema to Turkey.
But just how far Mr. Erdogan will take his offensive remains to be seen. Will it be a limited incursion to make a point, or a full-blown operation to root out the Kurdish force that the Americans have built up and the Turks desperately oppose.
The shopkeepers near the mosque in Kilis had no doubts about who was responsible for the attack. “P.K.K.,” they said.
The P.K.K., or the Kurdistan Workers’ Party, is an outlawed Kurdish separatist movement that has been fighting the Turkish state for three decades.
The shopkeepers make no distinction between the Kurdish militant groups in Syria and the P.K.K., which operates in southeastern Turkey and Iraq. The Kurdish militants are all one group — and one threat — to them.
“They want to stir the city, to muddy the waters because we stand with our state,” said Ercan Emir, a barber whose shop stands by the mosque.
“They think, ‘If we hurt them, and damage their lives and their goods, they will turn against the state,’ ” he added.
Kilis and other towns along the border have been convulsed since the war broke out in Syria in 2011. The violence drove about 3.5 million Syrian refugees into Turkey, bringing fighters and smugglers in their midst, and rocket fire from across the border.
Kilis suffered most when the fighters of the Islamic State seized territory just across the border. The militants rained missiles on the town almost daily, killing 24 people in the area in early 2016.
But the P.K.K. has been a long-term source of strife, too. Mr. Erdogan spent much of his early years in power trying to negotiate a peace deal with the P.K.K., but since talks broke down in 2015, he has overseen a crackdown on Kurdish militants and political activists.
The group returned to violence and has been blamed for 12 suicide bombings in the last two and a half years.
Given the strife, there is widespread support across the country for the military operation against Kurdish militants in the Syrian enclave of Afrin.
The Turkish news media, which is almost overwhelmingly pro-government, has been energetic in its coverage in a longstanding tradition of militaristic nationalism.
Opposition, meanwhile, has been stifled. Since the Afrin operation began last Saturday a few small protests against the operation were swiftly broken up, and dozens of people who made comments opposing the operation on social media have been detained. Most of them were Kurdish activists.
Mr. Erdogan, who recently allied his Justice and Development Party with the right-wing Nationalist Movement Party, has appeared on television in military fatigues.
A campaign against Kurdish separatists has always found support among nationalists and other backers of a strong Turkish state, two of the biggest political blocs in Turkey.
Military operations into Syria have also proved to be popular. Opinion polls showed 70 percent support for an operation that Turkey mounted in 2016 to clear the area of Islamic State, despite Turkish casualties.
Metin Gurcan, a security analyst and a columnist for El-Monitor, said he estimated that there was the same level of support for the Afrin operation.
“Now this operation is happening and it is one heart, one hand,” said Mr. Ozer, one of the shopkeepers.
Even the main opposition party, the Republican People’s Party, has voiced its support for the operation.
“We are a political party that is against the war,” said Mehmet Akif Perker, a local representative of the party. Yet, he added, “in a moment when nationalist pride is really strong, being against it will get a much stronger reaction from the people.”
“For years Turkey has suffered a lot from the P.K.K.,” Mr. Perker said. “We are afraid that if we negotiate with them, they will pursue terror again.”
The party also considered that it was in Turkey’s economic interest to prevent the creation of an independent Kurdish region to its south that could allow oil routes to bypass Turkey, he said.
The shopkeepers hoped the military operation would allow many of the Syrian refugees to return home. Many Syrian Arabs say they were forced out of their homes by the Kurdish-led Syrian Democratic Forces, which has been fighting to dislodge the Islamic State from the region.
Kilis, a town with a population of fewer than 100,000, has swelled to 130,000 with the influx of refugees, and although the Syrians have been widely accepted, there is local resentment, especially over economic resources.
Turkey has spent billions on the refugees, noted Mr. Emir, the barber, whose shop was empty. “If the government had given that money to the Turkish population there would not be any poor people left,” he said.
Many shops around the mosque were shuttered Thursday. That morning the shopkeepers attended the funeral of one of the victims of the rocket attack, a 65-year-old tailor, Muzafer Aydemir. The other victim, Tarik Tabbak, was a 22-year-old Syrian refugee.
The mosque’s imam and muezzin were at the funeral, too, their heads swathed in bandages after being wounded in the attack.
Mr. Emir had been cutting the hair of a client on Wednesday evening when the rocket struck. He heard a strange sound of grating metal and ran from his glass-fronted shop, his customer bounding after him.
“My client told me I saved his life,” he said, laughing, “and I did not charge him.”
“We are all going to die one day,” he added, “but because we might die at any moment, people treat each other more positively.”