"We are not in a position to continue hosting 3.5 million refugees forever. We'll solve the Afrin situation … and we would like our refugee brothers and sisters to return to their own country," President Recep Tayyip Erdogan declared earlier this month, speaking to provincial leaders at his presidential palace.

This was a remarkable turnaround for Erdogan and his government.

Since the start of the Syrian civil war, Turkey has pursued an open-door policy for those fleeing the conflict. "We regard you as our brothers and sisters ... Turkey is also your homeland," Erdogan told refugees at the Syrian border during Ramadan 2016 — even offering them Turkish nationality if they wanted it.

The cost of hosting the refugees was worn like a badge of honor; with the Turkish president and his ministers rarely missing an opportunity to contrast Turkey's generosity with the tight-fistedness of European countries.

But then the number of people seeking refuge soared, along with the cost for providing for them.

Read more: EU refugee aid enters new phase in Turkey

Watch video 02:44 Share Do Turks back their country's cross-border offensive? Send Facebook google+ Whatsapp Tumblr linkedin stumble Digg reddit Newsvine Permalink https://p.dw.com/p/2sRA6 Do Turks back their country's cross-border offensive?

Disenchantment with refugees

Erdogan — like no other Turkish political leader — is a believer of opinion polls. In a recent survey, 53 percent voiced their discontent with Syrian immigrants, and over 46 percent said that immigrant intake should be stopped. Polls also regularly record Syrian refugees as one of the main issues of concern, along with terrorism, and the flagging economy.

The discontent increasingly manifested itself in sporadic anti-refugee violence. Last year, one hundred Syrian and Afghan families were evacuated from an Istanbul suburb after two days of violence, following the killing of a Turkish teenager allegedly by Syrian and Afghan youths.

Dorian Jones is a DW correspondent in Istanbul

Even President Erdogan's supporters have become disenchanted. Recently I heard a taxi driver, a jobless university graduate, venting about the money being "wasted" on housing refugees and how they — unlike him — had access to free university education and medical treatment.

Envy is a common characteristic trait among many Turks. My taxi driver openly admitted he had been a strong supporter of the president. But when I asked whether he would vote for him again, he replied: "Never again!" However, he admitted being at a loss as to who to vote for instead.

Read more: Turkey's military offensive against Kurdish-held Afrin: What you need to know

Pandering to the electorate

So President Erdogan and his ministers have changed their tune. They no longer trumpet how much they spend on refugees and any talk of citizenship has disappeared from their speeches.

The reason for this apparent impressive political somersault may well be that next year Turkey faces local, general and presidential elections.

Turkish leaders stress only that the ongoing military offensive into Afrin and its expansion to include most of Syria's border region will bring the prospect of "allowing" Syrians to go home.

Read more: Free Syrian Army turns to Turkey for support

But promising to return hundreds of thousands of mainly-Arab, Syrian refugees to Syria's Afrin region is problematic. Afrin is predominantly Kurdish. In the early days of the military offensive, Erdogan prepared the political ground declaring at a public rally, that Afrin was originally majority Arab, and that the enclave would be returned to its "rightful owners."

Such claims triggered howls of condemnation from Syrian Kurdish groups and from Turkey's main pro-Kurdish party.

Ankara is now facing accusations of seeking to dilute Afrin's Kurdish composition, thereby resurrecting the dark tradition in the region of using demographics to secure political goals.

It is a charge Ankara hotly denies.

There is skepticism in Turkey whether a large number of Syrian refugees could be persuaded to return to a war-torn country, still in the midst of conflict; especially as many have started to carve out a life for themselves in Turkey.

But for now, Erdogan seems to bank on a surge in patriotism over the Afrin military operation. If he manages to quell discontent by promising to ensure the return of refugees to Syria, that may give him and his party enough of a boost to secure victory in the upcoming elections.