By Barbara Plett
BBC News, Islamabad
For the first time Pakistan's government is beginning a campaign to register all Afghans currently living in the country.
Afghans continue to try to cross Pakistan's border
There are some 2.5 million including thousands who fled the Soviet invasion of Afghanistan in 1979.
The drive is seen as a way to monitor a large and fluid community but also as another step towards repatriation.
Since the fall of the Taleban in 2001, Pakistani authorities have encouraged them to return to Afghanistan.
Afghans in Pakistan form a very mobile community.
Tens of thousands cross the border daily drawn by ethnic, family and business ties.
The government admits that some are probably Taleban militants but it says it is difficult to crack down on them because they blend in with the community.
Three years' grace
The registration will be carried out over 10 weeks with the help of the UN's refugee agency.
It will give the government detailed information about who is here, making it easier to monitor the population.
It will also give the Afghans an identity card prolonging their stay in the country for three more years.
After that, Pakistan is determined to close the remaining refugee camps with the ultimate aim of repatriating all Afghan refugees.
But this may be difficult.
A survey shows that many Afghans prefer to stay in Pakistan, partly because of the security situation in Afghanistan but also because it is easier to get housing and jobs here.