Czech Prime Minister Andrej Babiš has said there was "really no place" for Afghan refugees in the European Union.
The populist leader suggested it would be better to "find a solution that allows them to stay in Afghanistan".
The comments were made after a meeting on Tuesday with Austrian Chancellor Sebastian Kurz and Slovakian Prime Minister Eduard Heger.
The EU leaders said they were ready to help Afghan refugees after the Taliban took over, but only those who fled to neighbouring countries.
"There is really no place for them in Europe," Babiš said at Lednice Castle, in the southeastern Czech Republic.
"One option is to hold talks with [Turkish President Recep Tayyip] Erdoğan, as in the past, but I don't think this is a good solution.
"A better option is a solution that allows people to stay in Afghanistan," he added.
In 2016, the EU struck a migration deal with Turkey, where Ankara pledged to prevent millions of mostly Syrian refugees from fleeing for Europe in exchange for funding to help it house more than three million immigrants.
Chancellor Kurz said Austria had earmarked €18 million to help Afghan refugees in Afghanistan's neighbouring countries.
"We will try to alleviate their suffering, but we agreed that 2015 should not happen again," he said on Tuesday. "We are against illegal immigration and we will fight the smugglers."
It is a matter of "finding a regional solution and not triggering a new exodus to Europe", Kurz added
In 2015, an estimated 1 million people entered Europe from the Middle East, Africa, and Asia