The EU will have to engage with the Taliban to provide support to the Afghan people, even if it does not recognise the group as legitimate rulers of the country, the bloc's foreign policy chief said on Tuesday.
"We have to talk with them for everything, even to try to protect women and girls. Even for that, you have to get in touch with them," Josep Borrell said after a meeting of EU foreign ministers.
"We will put conditions for continual support and we are going to use our leverage ... to make sure human rights are respected.
"I know that when I'm saying that it looks a little bit wishful thinking. But we will use all our leverage."
Mr Borrell said humanitarian aid must be maintained and even increased, but assistance would only go to the Afghan government if conditions were met.
He said there could be “no payments of development assistance until we clarify the situation” with Taliban leaders.
The Taliban must respect UN Security Council resolutions and human rights to earn access to the funds, Mr Borrell said.
The 27-nation bloc has pledged about €1.2 billion ($1.41bn) in development assistance for Afghanistan for 2021-2024.
Mr Borrell said co-operation with any future Afghan government "will be conditioned on a peaceful and inclusive settlement and respect for the fundamental rights of all Afghans, including women, youth and persons belonging to minorities".
He said the government must also have "respect for Afghanistan’s international obligations, commitment to the fight against corruption and preventing the use of Afghanistan’s territory by terrorist organisations".
Mr Borrell called on all parties to allow safe and unhindered access for humanitarian assistance to Afghan women, men and children in need, including the large number of internally displaced people.
"The EU calls on the Taliban to respect their obligations under international humanitarian law in all circumstances," he said.
"The EU will also support Afghanistan's neighbours in coping with negative spillovers, which are to be expected from an increasing flow of refugees and migrants."
The bloc's priority was to fly out EU staff and Afghans who assisted them from Kabul, he said..
"We have to get in touch with authorities in Kabul," Mr Borrell said after the meeting. "The Taliban have won the war, so we will have to talk to them.
Starting a dialogue soon was necessary to prevent a migration disaster and humanitarian crisis, he said.
After the meeting, German Foreign Minister Heiko Maas said the West would judge the Taliban "by their actions", after the militants said all of their opponents would be pardoned.
"What's important is that this transition phase will be peaceful and that will depend on what the transition government actually does as soon as it's in place, in terms of whether we can believe their statements," Mr Maas said.
He said his country had suspended aid to Afghanistan and would work with the EU to provide assistance to neighbouring countries facing a surge in Afghan civilians.
Mr Maas blamed the Taliban for slowing down evacuations.
"The situation is much more dangerous [for Afghans] because there is no promise of being let through at the Taliban checkpoints," he said.
Earlier on Tuesday, German Chancellor Angela Merkel conceded it would be difficult to agree to a common European policy on Afghan asylum seekers and urged a "controlled" EU response.
Mrs Merkel said people fleeing Afghanistan should be helped first in neighbouring countries in co-ordination with the UN refugee agency, UNHCR.
"Then, in a second step, we can think about whether people who are particularly affected should come to Europe and to European countries in a controlled and supported manner," she said.
"We know that finding a common European position is not easy."
Mrs Merkel said it was "a weakness of our EU that we didn’t create a common asylum policy, and we must continue to work on this with vigour".
She spoke to UK Prime Minister Boris Johnson on Tuesday morning, after he called for an online meeting of G7 leaders.
Downing Street said the two leaders agreed that global co-operation was crucial in preventing a humanitarian disaster in Afghanistan and in organising evacuations.
"Both leaders resolved to use their bilateral and multilateral influence to encourage international partners to adopt a joined-up approach to the challenges ahead," Mr Johnson's office said.
"The prime minister also stressed the need to agree shared international standards on human rights that any future Taliban government in Afghanistan will be held to by the international community.”
Germany last week stopped deportations to Afghanistan because of the Taliban advance but Austria has not given up hope of continuing forced removals.
Vienna said setting up refugee centres in Afghanistan’s neighbouring countries was another option.
“If deportations are no longer possible … alternatives must be considered,” Austria’s Interior and Foreign Ministers said in a joint statement.
The UNHCR said all deportations of failed asylum seekers must be stopped after the Taliban seized power.
UN Secretary General Antonio Guterres urged countries to stop deportations and show willingness to take in refugees.
“Afghans have known generations of war and hardship,” Mr Guterres said. “Now is the time for solidarity.”
The EU's Economy Commissioner, Paolo Gentiloni, said he thought that "Europe will inevitably have to equip itself for humanitarian corridors and organised reception, also to avoid uncontrolled flows of illegal immigrants".
"Or, at least, the countries that are willing to do so should," Mr Gentiloni said.
Leading politicians in Germany, Austria and Greece said there could be no repeat of the 2015 migrant influx into Europe.
Greek Migration Minister Notis Mitarachi said his country "will not and cannot be the gateway to Europe for the refugees and migrants who could try to come to the European Union".
Mr Macron’s “shameful statement … in the midst of a terrible human rights and humanitarian crisis is unfortunately reflecting the position of many other leaders”, Ms Callamard said.
Afghan activists and civil society “have to face the Taliban alone … but what concerns this president is the risk of migration flows", she said.
Ms Callamard also had words for non-EU member Turkey, as construction of a border wall with Iran was expedited after the growing crisis.
An estimated 400,000 people have been displaced since the start of the year because of the violence in Afghanistan.
The Taliban’s rapid success led Afghans to crowd Kabul’s international airport on Monday in the hope of escaping the country.
While Europe is trying to fly out its own citizens and low numbers of Afghan staff, leaders are unwilling to open up to a wider migrant surge.
With the EU’s eastern borders already under pressure because of a continuing feud with Belarus, Europe is increasingly turning to military might to guard its frontiers.
Mr Macron said France, Germany and other nations would put forward a “robust, co-ordinated and united” response to prevent irregular migration.
"We must anticipate and protect ourselves against significant irregular migratory flows that would endanger the migrants and risk encouraging trafficking of all kinds," he said.
He said France would continue to do its “duty to protect those who are most under threat in Afghanistan".
Mr Borrell held talks with US Secretary of State Antony Blinken and Nato chief Jens Stoltenberg to discuss evacuation efforts.
Mr Johnson spoke to US President Joe Biden on Tuesday.
They resolved to continue working closely together in the days and weeks ahead to allow as many people as possible to leave the country.
The leaders also agreed on the need for the global community to come together to prevent a humanitarian crisis in Afghanistan.
Mr Johnson outlined UK plans, including increased humanitarian aid to the region and resettlement of refugees.
He stressed the importance of not losing the gains made in Afghanistan over the past 20 years, of protecting the UK against any emerging threat from terrorism and of continuing to support the people of Afghanistan.
Both leaders plan to discuss this issue further at the online meeting of G7 leaders in coming days.
Follow the latest updates on Afghanistan here