ISTANBUL — Turkey’s offensive in northern Syria has exposed President Recep Tayyip Erdogan to a furious international backlash, with threats of arms embargoes, sanctions that could tank his vulnerable economy and daily, stinging condemnations from Western allies.

But in Turkey, where Erdogan’s voice dominates, the military campaign has generated little public debate.

Turkish celebrities and athletes have rallied behind the military. Opposition parties have been broadly supportive. Flag-waving Turks greet soldiers in border towns as they prepare for battle, and the news media memorializes Erdogan’s utterances in headlines.

At the same time, critical voices in Turkey have been cowed, shouted down and in some cases detained.

Erdogan has shown no sign he intends to stop the offensive or even limit its scope. To the contrary, Turkey appeared to expand the operation Monday, sending allied Syrian rebel fighters to capture the town of Manbij — miles from the area inside northern Syria where the Turkish government says it intends to establish a “safe zone.”

Foreign observers have been alarmed by Erdogan’s insistence on pursuing an operation that has upended Syria’s conflict and set off a new wave of civilian suffering. But Turkey’s government has been eyeing its domestic audience, too, and betting it could weather the international outrage, analysts said.

“He is very defiant. I don’t think he takes these criticisms into consideration,” said Soli Ozel, a professor of international relations at Istanbul’s Kadir Has University, speaking of Erdogan’s reaction to the scoldings from countries such as Germany, Britain and the United States.

President Trump spoke Oct. 12 about his decision to withdraw U.S. forces from northern Syria, saying "let [the Kurds] have their borders." (The Washington Post)

President Trump’s threats against Turkey — including the imposition Monday of sanctions on Turkish ministries and senior officials — were unlikely to dent Erdogan’s support. “Like in the rest of the world, everyone is very resentful of the American president,” Ozel said.

For Erdogan, along with his senior aides who have spoken publicly in support of the operation in recent days, “the line is very rigid. They are 100 percent sure of their righteousness,” he added.

The stated goal of the mission is to clear Syrian Kurdish fighters from northern Syria, a pledge Erdogan has made repeatedly to the Turkish public. Ankara considers the fighters terrorists because of their links to the Kurdistan Workers’ Party, or PKK, which has fought a decades-long insurgency inside Turkey. The security establishment in Turkey shares Erdogan’s goal and has carried out regular attacks on PKK fighters in northern Iraq for years, albeit with far less fanfare, Ozel said.

Erdogan says he intends to relocate hundreds of thousands of Syrian refugees in Turkey to whatever slice of territory Turkish forces carve out of Syria. The plan is largely motivated by domestic politics: During elections, including recent municipal polls, Turkish voters have registered dissatisfaction with Erdogan’s ruling party for its years-long support of Syrian refugees, which has entailed providing millions of migrants with access to state services.

Refugee advocates say the Syrians are actually a boon to the economy and are being unfairly scapegoated. Erdogan’s plan, they add, is both impractical and unjust. Regardless, the government has reversed its liberal attitude toward the refugees, tightening security at the border, imposing restrictions on their travel within Turkey and deporting hundreds of Syrian refugees to their home country in recent months.

“Politically, they are too costly a burden,” Ozel said. “I think the part of the operation that may be appealing to the Turkish population is the prospect of emptying homes, streets and cities from guests who have overstayed their welcomes,” he said, referring to Turkey’s offensive.

As Turkey has pushed back at the criticism from abroad, the news media at home have been Erdogan’s unflagging ally.

“The press has been star-struck,” Selim Koru, a Turkish political analyst, wrote in a Twitter thread about the atmosphere in Turkey during the incursion. “ ‘Security experts’ have taken over the airwaves, pictures of joint operations rooms invoke Hollywood movies. Even previously critical editors now give the commander-in-chief their rapturous attention,” he wrote.

Echoing Erdogan’s rebuke of Western allies for suggesting Turkey should negotiate with the Kurds in Syria, one headline read Monday: “Did you recruit the terror organization to NATO?”

“All of you together couldn’t make one Turkey,” another headline read, amplifying Erdogan’s put-down of the Arab League after it condemned the Turkish offensive.

The government has bristled at rare instances of internal dissent. When members of a pro-Kurdish political party tried to march in Istanbul on Sunday, nine people were detained. And when Mustafa Akinci, the pro-Turkish president of North Cyprus, wrote on social media that Turkey’s offensive would be bloody and called for “dialogue and diplomacy,” he was denounced by senior Turkish officials, including Erdogan.

Hakan Demir, the website editor for Birgun, a daily newspaper, was detained last week after publishing a story that reprinted a statement by the Syrian Kurdish fighters who are the target of the Turkish offensive.

The authorities came for him at 4 a.m. Thursday, when Demir was up watching the television show “Hannibal,” he said. He was released later that day but is still being investigated, he said in an interview.

“With this operation, the government is trying to push the media to follow a particular line. But the whole world is watching,” he said. “The government wants all media to do their propaganda for them. We want to show developments with an independent eye.”