Turkish secular opposition leader Kemal Kilicdaroglu pledged on Thursday to send back millions of migrants in a bid to win the backing of an ultra-nationalist who helped to steer last weekend's presidential vote to a run-off.
The opposition put in its best performance in Mr Erdogan's two-decade rule.
But it fell short of expectations set by pre-election polling, leaving the opposition downcast.
Mr Kilicdaroglu, 74, has since revamped his campaign team and toughened his message to win over Turkey's right-wing voters in the May 28 run-off.
He also plans to meet Sinan Ogan, the far-right figure who picked up 5.2 per cent of the vote and is still considering which of the two to endorse.
Mr Kilicdaroglu tried on Thursday to toughen his message considerably from the more inclusive tone he set in the first stage of the campaign.
"Erdogan, you did not protect the borders and honour of the country," the former civil servant said.
"You have deliberately brought more than 10 million refugees to this country … As soon as I come to power, I will send all the refugees home."
Mr Ogan has said he will only back a candidate who cracks down on migrants and fights "terrorism" — a reference to Kurdish militants.
Veteran Turkey watcher Howard Eissenstat of the Middle East Institute said Mr Kilicdaroglu was wooing nationalists by attacking Syrians because Kurds made up an important part of his base.
"The Kurds are a big part of his coalition," Mr Eissenstat said.
"But the Syrians are a relatively safe target because, for the large part, they cannot vote."
Voting in Turkey's presidential election - in pictures
Mr Erdogan and his Islamic-rooted party were praised across large parts of the Muslim world for embracing those fleeing conflicts in countries such as Syria.
Turkey's five-million refugee and migrant population became the world's largest in the past decade.
A 2016 deal between Ankara and the EU helped to stem the continent's migrant crisis by allowing those trying to reach Western Europe to settle in Turkey.
Turkey won billions of euros in funding from Brussels for the programme.
But an economic crisis that increased as the election neared sent anti-migrant sentiment soaring.
Mr Erdogan's government has tried to find a middle ground.
Interior Minister Suleyman Soylu said on Thursday that Turkey had already sent more than half a million Syrians back.
"We are not going to make Turkey into a refugee warehouse and we have not done so to date. But the Syrians are our brothers," Mr Soylu said.
"We cannot send them to their deaths. And we have not. Tayyip Erdogan doesn't want to be remembered as a leader who sent Syrians to their deaths."
Mr Eissenstat said Mr Erdogan looked comfortable heading into the run-off and did not need to radically change his tone.
"He felt like he was in danger before Sunday," the analyst said.
"I don't feel like he feels that way any more."