More than 10,000 Afghan migrants rushed to the border on Tuesday, the last day of a deadline for 1.7 million Afghans to leave Pakistan voluntarily or face arrest and deportation.

The government has said it would begin arresting undocumented Afghans and taking them to new holding centres from Wednesday, from where they will be processed and forcibly returned to Afghanistan.

The Taliban government in Kabul says the policy amounts to "harassment".

"Thousands of Afghan refugees are waiting for their turn in vehicles, lorries, and trucks, and the number continues to grow," Irshad Mohmand, a senior government official at the Torkham border told AFP.

"More than 10,000 refugees have gathered since morning."

More than 100,000 Afghan migrants have fled Pakistan since the start of October when the government announced that 1.7 million Afghans it says are living illegally in Pakistan have a one-month deadline to leave.

"To avoid any humiliation by the Pakistani authorities I have decided to leave," Zulfiqar Khan, who was born to refugee parents in a sprawling Peshawar aid camp, told AFP last week.

More than 80 percent have left via the northern Torkham border in Khyber Pakhtunkhwa province, where the majority of Afghan migrants live.

Police in the province said they have not yet begun arrests as families leave voluntarily, but Afghan refugees in Karachi and Islamabad have reported arrests, harassment and extortion.

- 'Significant risk' -

Lawyers and activists have said the scale of the crackdown is unprecedented, appealing for more time for Afghans -- some of whom have lived for decades in the country -- to be given more time to pack up with dignity.

"The Pakistani government is using threats, abuse, and detention to coerce Afghan asylum seekers without legal status to return to Afghanistan or face deportation," Human Rights Watch said on Tuesday.

"The situation in Afghanistan remains dangerous for many who fled, and deportation will expose them to significant security risks, including threats to their lives and well-being."

Millions of Afghans have crossed the border during decades of conflict, making Pakistan the host of one of the world's largest refugee populations.

Hundreds of thousands of Afghans are estimated to have fled to Pakistan since the Taliban government took control in August 2021.

Pakistan has said the deportations are to protect the "welfare and security" of the country, where anti-Afghan sentiment has been growing amid prolonged economic hardship and a rise in cross-border militancy.