Europe has a moral duty to take in Afghan refugees and stop them falling into the hands of smugglers, the head of the European Commission has said.
Ursula von der Leyen said setting up legal pathways for Afghans would be a central issue at G7 talks on Afghanistan in the coming days.
During a visit to a Spanish military base that will serve as a reception centre, she said the EU had operational contacts with the Taliban but had not recognised the militant regime.
Continued aid would hinge on the treatment of women and girls, she said.
European countries are determined to prevent a repeat of the 2015 refugee crisis in which more than a million people crossed into the EU.
The bloc wants to help Afghanistan’s neighbours intercept refugees and provide aid within the country to help displaced people return home.
But Ms von der Leyen said some legal routes for resettlement were necessary to prevent desperate Afghans from turning to human traffickers.
Brussels will consider providing funds for EU countries who take on some of the migrant burden, she said.
“These human traffickers put Afghans, who right now try to flee the conflict, in at least as much danger,” she said.
“And therefore, to those who cannot go back or stay home, we have to offer alternatives. This resettlement of vulnerable people is of utmost importance, it is our moral duty.”
Hundreds of thousands of people are thought to have been displaced by fighting in Afghanistan this year.
The Taliban takeover has raised particular concerns for journalists and human rights activists, as well as women and girls.
Some city leaders in Europe have promised to take people in, with Munich offering 260 places and Barcelona ready to welcome 50 women and girls.
Other Afghans are being flown out of Kabul airport after helping Nato troops during their 20-year campaign.
The Spanish base visited on Saturday by EU leaders including European Council President Charles Michel has space for 800 people, Spain's Prime Minister Pedro Sanchez said.
Some Afghans with no legal rights to enter Europe tried to rush the airport in a desperate bid to escape from the Taliban.
On Friday, Nato foreign ministers told the Taliban to allow humanitarian access to Afghanistan and to prevent terrorists from becoming established in the country.