A UN envoy has met Afghanistan's new interior minister who was for years was one of the world's most wanted Islamist militants and is now part of a government trying to head off a humanitarian crisis.

The meeting between Deborah Lyons, head of the UN mission in Afghanistan, and Sirajuddin Haqqani focused on humanitarian assistance, Suhail Shaheen, a Taliban spokesman, said in a statement on Twitter.

"(Haqqani) stressed that UN personnel can conduct their work without any hurdle and deliver vital aid to the Afghan people," he said.

Afghanistan was already facing chronic poverty and drought but the situation has deteriorated since the Taliban took over last month with the disruption of aid, the departure of tens of thousands of people including government and aid workers and the collapse of much economic activity.

UN Secretary-General Antonio Guterres told an international aid conference this week that Afghans were facing "perhaps their most perilous hour".

Mr Guterres also said any suggestion the UN can solve Afghanistan's problems is "a fantasy" and that its capacity to mediate for a more inclusive Taliban government is limited.

Asked whether he felt pressure to repair the country's plight, Mr Guterres said: "I think there is an expectation that is unfounded" of UN influence as the main international organisation still on the ground there.

The UN mission in Afghanistan said that in meeting yesterday, Ms Lyons had stressed the "absolute necessity for all UN and humanitarian personnel in Afghanistan to be able to work without intimidation or obstruction to deliver vital aid and conduct work for Afghan people".

The Taliban repeatedly targeted the United Nations during the two-decades-long US-led military mission in Afghanistan that ended last month with the rout of the Western-backed government by the Taliban.

In one of the bloodiest incidents, Taliban militants killed five UN foreign staff in an attack on a guest-house in Kabul in 2009.

More recently, gunmen attacked a UN compound in the city of Herat in July with rocket-propelled grenades killing a guard, while protesters in the northern city of Mazar-i-Sharif in 2011 killed seven UN staff.

The Haqqani network, a faction within the Taliban and for years based on the border with Pakistan, was held responsible for some of the worst militant attacks in Afghanistan during the Taliban insurgency.

The United States designated the group a terrorist organisation in 2012.

Haqqani, head of the eponymous network founded by his father, is one of the FBI's most wanted men with a reward of $10million for information leading to his arrest.

US officials and members of the old US-backed Afghan government for years said the Haqqani network maintained ties with a- Qaeda.

The Taliban have promised not to let Afghanistan be used for militant attacks on other countries.

UN High Commissioner for Refugees Filippo Grandi has warned of global implications if the humanitarian situation in Afghanistan, which he said remains despearte, were to escalate.

"If public services and the economy collapse, we will see even greater suffering, instability, and displacement both within and outside the country," he added.

"The international community must therefore engage with Afghanistan - and quickly - in order to prevent a much bigger humanitarian crisis that will have not only regional, but global implications."

Even before the Taliban took over last month, Mr Grandi said, more than 18 million Afghans, or about half the population, required humanitarian aid.

More than 3.5 million Afghans were already displaced in a country that is battling drought and the Covid-19 pandemic.

The world has watched a number of countries send thousands of soldiers to Afghanistan and spend vast sums of money for 20 years since a US-led invasion ousted the Taliban for harbouring al-Qaeda leader Osama bin Laden.

The United States spent $1 trillion, only to see the Afghan government and military it supported collapse ahead of a full withdrawal of US and other foreign forces last month.

"To think - given that they have failed with all these resources to fix the problems of Afghanistan - that we can now, without those forces and money, solve the problems they couldn't solve for decades is a fantasy," Mr Guterres said ahead of next week's annual UN gathering of world leaders in New York.

The United Nations will be doing everything it can for a country, that Mr Guterres said, is on "the verge of a dramatic humanitarian disaster" and has decided to engage the Taliban in order to help Afghanistan's roughly 36 million people.