Thousands of people are scrambling to flee Afghanistan after the Taliban seized back control of the country, almost two decades after they were ousted by a US-led coalition.
The United Nations has warned that up to half a million Afghans could flee the country by the end of the year and has called on neighbouring countries to keep their borders open.
The current crisis comes on top of the 2.2 million Afghan refugees already in neighbouring countries and 3.5 million people forced to flee their homes within Afghanistan's borders.
How many Afghans were evacuated?
The US-led operation to evacuate people by air has now ended, with the last flight taking off from Kabul airport just after midnight on Tuesday - a deadline agreed with the Taliban for foreign forces to withdraw.
More than 123,000 civilians were evacuated by US forces and its coalition partners after the Taliban took control of the capital on 14 August - but it's unclear exactly how many of those were Afghan nationals.
The US has said that it flew nearly 80,000 civilians out of Kabul and of those, about 5,500 were Americans and more than 73,500 were either Afghans or other foreign nationals.
While the UK Ministry of Defence, which ended its evacuations on Saturday, said it had flown out more than 15,000 people and some 8,000 of them were Afghans.
At the height of the operation, the US said its military planes were departing the airport every 39 minutes - although the evacuations did slow down after the suicide bomb attack on the 26 August outside the airport, which killed about 170 people, including 13 American troops.
Many of those flown out of the country were taken to emergency processing centres set up in several countries, including Spain, Germany, Qatar and Uzbekistan.
As many as 300,000 Afghans have been affiliated with US operations in the country since 2001, according to the International Rescue Committee, and tens of thousands of them are eligible to obtain a US visa - but many will now have to find a different way out of the country.
At the weekend, the US said it had received assurances from the Taliban that Afghan nationals who are issued with valid travel documents by another country will be allowed to leave Afghanistan.
What's happening on the border?
The Taliban control all the main land crossing points with Afghanistan's neighbours (shown on the map below) and reports suggest they are only allowing traders or those with valid travel documents to leave the country.
However, many of those trying to flee because they fear for their safety under Taliban rule will not have any paperwork.
The UN has urged Afghanistan's neighbours to keep their borders open to refugees and called on the international community to support those countries.
But Uzbekistan, which borders the north of Afghanistan, has said its main crossing point is closed to "ensure security" and there are no plans to open it.
Pakistan, which has the longest border with Afghanistan, has also said it will not accept refugees - with its US ambassador telling the BBC: "We are already overburdened by the refugees, and it is beyond our capacity to host any more refugees."
Last week, satellite imagery of the Spin Boldak crossing point between Afghanistan and Pakistan showed a large crowd of people gathered on the Afghan side.
The BBC's Shumaila Jaffery, who was at the crossing point, said it was a chaotic scene with many Afghans not being allowed to enter Pakistan.
Last Friday, two Afghans were reportedly killed by Pakistani security forces at the Torkham border crossing after trying to enter Pakistan illegally.
There have also been reports of thousands of Afghans trying to cross the western border with Iran, but it's unclear how many have been successful.
How many have fled their homes?
The latest movement of Afghans is part of a historical exodus from a country that has suffered instability and conflict over many years.
Even before the Taliban retook control, more than 550,000 people had been forced to flee their homes this year due to fighting, according to the UNHCR.
That means an estimated 3.5 million Afghans are currently internally displaced within the country.
In addition to those within Afghanistan's borders, about 2.2 million refugees and asylum seekers were also seeking sanctuary in neighbouring nations as of the end of last year.
This year, Afghans have also had to deal with a severe drought and food shortages across most of the country. A report by the UN World Food Programme (WFP) in June said that 14 million people - more than a third of the population - were suffering from hunger.
Mary-Ellen McGroarty, WFP country director for Afghanistan, said last week that unless emergency food and medical supplies arrived soon, the "already horrendous situation" would become "an absolute catastrophe, a complete humanitarian disaster".
Where do Afghan refugees go?
Neighbouring countries Pakistan and Iran saw the highest numbers of Afghanistan's refugees and asylum seekers last year.
Almost 1.5 million fled to Pakistan in 2020, while Iran hosted 780,000, according to UNHCR figures.
Germany was third, with more than 180,000, while Turkey took nearly 130,000.
When looking at asylum seeker numbers only - those who have applied for sanctuary in another country but whose claims have not yet been granted - Turkey, Germany and Greece top the list, with about 125,000, 33,000 and 20,000 respectively.
Although there are no Afghan asylum seekers in Iran, those with refugee cards - an official document recognising their status - are able to access the country's health and education systems.
What are countries doing to help?
The UN has called on its member states to help Afghan people in "their darkest hour of need" - but while some countries have offered refugees a safe haven, others have indicated they will not be giving sanctuary to those fleeing the crisis.
Both Pakistan and Iran have said that they cannot cope with a further influx of Afghan refugees. Officials in both countries have said that any refugees that do arrive will have to stay in camps near the border until they can return to Afghanistan.
Uzbekistan has said it will help transfer Afghans to third countries but will only host refugees temporarily. The Tajikistan government previously offered to accept up to 100,000 refugees but it's unclear if any have been allowed in yet. Turkmenistan has said its airspace can be used for evacuation flights but it hasn't made any commitment to take in refugees itself.
In Turkey, the government has urged European countries to take responsibility for any new migrant crisis, saying Turkey would not be "Europe's migrant storage unit". The country has stepped up construction of a border wall with Iran to thwart those entering illegally.
Officials in several European Union countries say they are keen to avoid a repeat of the 2015 migrant crisis, when there was a populist backlash against large numbers of Syrian refugees being allowed to enter EU territory.
France, which evacuated more than 2,800 people from Kabul airport, mostly Afghans, has indicated it will accept some refugees but has not specified a number. Germany has also not specified a number but Chancellor Angela Merkel has said as many as 40,000 people still in the country may have a right to be evacuated to Germany if they feel they are endangered.
Other EU countries, like Austria, Poland and Switzerland have said they will not accept any new Afghan arrivals and are upping their border security to guard against illegal arrivals.
The UK has said it will take in 5,000 Afghans in 2021 as part of a scheme to resettle 20,000 over the next few years, focusing on those at greatest risk from the Taliban.
The US has not said how many refugees it will accept yet, but it has authorised $500m (£367m) for "unexpected urgent refugee and migration needs of refugees". Canada has said that it will resettle 20,000 Afghans while Australia has said it will take in 3,000.
Several countries, including Kosovo and Uganda, have also accepted US requests to temporarily accept Afghan refugees before they are resettled elsewhere.