A Taliban government order banning Afghan women from working for the UN mission breaches the world body's charter, top UN officials said on Wednesday as they demanded its immediate revocation.
Female staff members are essential to UN operations, including in the delivery of life-saving assistance, Secretary General Antonio Guterres's spokesman said.
"The enforcement of this decision will harm the Afghan people, millions of whom are in need of this assistance,” Stephane Dujarric said in a statement.
Mr Dujarric called the ban "a violation of the inalienable fundamental human rights of women".
UN special representative for Afghanistan Roza Otunbayeva said Taliban authorities had notified the UN that they will be “actively” enforcing the measure.
“Several UN national female personnel have already experienced restrictions on their movements, including harassment, intimidation and detention," Ms Otunbayeva said.
"The UN has therefore instructed all national staff — men and women — not to report to the office until further notice."
Ms Otunbayeva, who has been engaging with the Taliban at the highest level in a bid to reverse their order, stressed that the ban is “unlawful under international law” and in breach of the UN charter.
“In the history of the United Nations, no other regime has ever tried to ban women from working for the organisation just because they are women,” she said.
The ban is unlawful under international law and cannot be accepted by the UN, the statement said.
Afghan women were already barred from working at national and international non-government organisations. But the ban did not include the UN until Tuesday.
Taliban authorities in December ordered all organisations to stop employing Afghan women after receiving “serious complaints” that female employees were not observing proper dress code.
The US ambassador to the UN, Linda Thomas-Greenfield, said Washington was working “very closely” with Afghan partners.
Ms Thomas-Greenfield said the Taliban's attempt to “erase women” was “unacceptable”.
“We’ve said from the beginning that we will judge them on their actions, and their actions certainly suggest that there’s no reason to recognise this as a legitimate act,” she said.
UN Deputy Secretary General Amina Mohammed urged the Taliban leadership on Wednesday to refresh their interpretation of Islamic law, which would be especially important during Ramadan.
“I am terribly troubled by the fact that in the month of Ramadan, what we get from the Taliban is a strike against the teachings and the belief of Islam,” Ms Mohammed told reporters.
Since the toppling of the western-backed government in Kabul, Taliban authorities have tightened control over women's access to public life, including barring them from university and schools.
Women are also not allowed to enter parks or gardens.
The UN has about 3,900 staff in Afghanistan, including 3,300 Afghans and 600 international personnel, Mr Dujarric said.