The EU is preparing for an influx of Afghans seeking asylum, regardless of whether people flee in masses from the new Taliban government, the chief of the EU border agency said.
Millions of Afghans are already displaced in neighbouring countries and could try to reach the EU from there, Fabrice Leggeri, director general of Frontex, told Reuters.
Mr Leggeri said the agency was preparing for a possible surge through traditional routes, such as from Turkey to Greece, and new ways, including through Belarus.
Brussels has accused Belarus of sending illegal migrants across its frontier.
Frontex is "monitoring what's going on" inside Afghanistan, but also keeping an eye on Afghan communities in nearby states, especially Iran, Pakistan, Turkey, Tajikistan, Uzbekistan and Turkmenistan.
"Our expectation is that depending on what's going on in Afghanistan, of course, people in need of international protection might try to flee from Afghanistan," he said.
"But what will very likely happen first is that the Afghan communities living abroad might try to move to the European Union."
The EU has tried to reform its migration system after a crisis in 2015 to 2016, when more than a million people arrived, most of them crossing the Balkans on foot to reach northern Europe.
The EU is now better at returning migrants who do not have a valid asylum claim, Mr Leggeri said.
While it is unsafe to send Afghans home, migrants from other countries might be tempted to pose as them to gain entry.
Mr Leggeri said border guards were better now than six years ago at determining where people are from.
"Now you cannot return Afghan people to Afghanistan," he said. "Of course we cannot. But we can return people who pretend they are Afghan people and they are not."
Experts posted to the EU's external borders can identify the nationality of a person by listening for dialects and tones of speech, Mr Leggeri said.
Afghan migration could become entangled in Europe's dispute with Belarus, which the EU accuses of flying in migrants from the Middle East to send them illegally across the border, causing a 1,500 per cent rise in irregular arrivals into Lithuania.
Minsk denies fostering illegal migration but says Europe must lift sanctions imposed on Belarus if it wants it to stop.
"What happened with Belarus clearly opened the eyes of everybody," Mr Leggeri said.
"The way of pushing in migrants deliberately … Criminal networks want to make money but state organisations, they want to deal with geopolitics and this is another story."
"It depends on geopolitical factors whether, let's say, the crisis in Afghanistan from a migration perspective might be linked to the crisis we have in Belarus."