Afghanistan's Taliban government has urged Pakistan to allow undocumented Afghans in the country more time to leave as pressure mounts at border posts swarmed by thousands of returnees fleeing the threat of deportation.

Islamabad has given 1.7 million Afghans it says are living illegally in the country until November 1 to leave voluntarily or be forcibly removed.

More than 130,000 people have left Pakistan since the order was given at the start of October, according to border officials in the towns of Torkham and Chaman, creating bottlenecks at either sides of crossings.

In a statement late Tuesday, Taliban authorities thanked Pakistan and other countries that have hosted millions of Afghans who fled their country during decades of conflict, but "asked them to not forcibly deport Afghans with little notice but to give them time to prepare".

Since taking power in 2021, the Taliban government has urged Afghans to return home, but has also condemned Pakistan's actions, saying nationals are being punished for tensions between Islamabad and Kabul, and calling for people to be given more time to depart.