Pakistan's government has ordered all unauthorised Afghan asylum seekers - an estimated 1.7 million people - to leave the country by November.
A spike in militant attacks along the two countries' border this year has escalated tensions.
Pakistan has blamed border crossing attacks on Afghanistan-based operatives - charges denied by the Taliban regime.
But it has fuelled resentment in Islamabad, which on Tuesday announced a crackdown on "illegal" migrants.
Last week, a blast at a mosque in Mastung city, near the border with Afghanistan, killed at least 50 people during a religious celebration.
Pakistan's Interior Minister Sarfraz Bugti did not appear to directly reference that and another attack in Balochistan province when he announced the crackdown order on "illegal" Afghans on Tuesday.
The right to seek refuge in a foreign country is enshrined in international law. Pakistan has taken in hundreds of thousands of Afghan refugees - particularly since the Taliban returned to power in Afghanistan in 2021.
About 1.3 million Afghans are registered as refugees while another 880,000 have received the legal status to remain, according to the UN.
But another 1.7 million people are in the country "illegally", claimed Mr Bugti on Tuesday - an apparent reference to those who have not yet gained refugee status.