Germany will not recognize the Taliban as the legitimate rulers of Afghanistan as long as "terrible" conditions persist under Islamist rule, German Foreign Minister Annalena Baerbock said.

No foreign government has formally recognized the Taliban since they took over Afghanistan last August, following the withdrawal of the US and other foreign forces.

The situation is getting dire, Baerbock said at a press conference in Islamabad.

She warned of a looming humanitarian and economic crisis in a country where she says girls are being denied education, women are excluded from public life and dissenting voices are being suppressed.

The Taliban have denied allegations of rights violations and say they are working to create conditions under which they will open secondary schools for girls.

Pakistan's new Foreign Minister Bilawal Bhutto Zardari said the Taliban should listen to the international community's concerns about rights and security.

Baerbock called for unity to put pressure on the Taliban. The international community needs to come together and together loudly and clearly tell the Taliban that they are moving in the wrong direction, she said.

The Foreign Minister also said that Germany and Pakistan have streamlined the system for bringing Afghan refugees to Germany via Pakistan, and in recent months more than 14,000 particularly at risk Afghans have been able to leave for Germany.

Baerbock later cut short her visit to Pakistan after testing positive for coronavirus.