Pakistan has extended by six months a deadline for Afghan refugees to register with the government, a refugee official said on Wednesday, a day before the deadline was set to expire. Pakistan has the world's second largest refugee population, with more than 1.5 million registered, and about a million unregistered, refugees from Afghanistan, most of whom fled the Soviet occupation of their country in the 1980s. The number of Afghans voluntarily returning home has plunged this year as violence worsens in Afghanistan, where the government and its US allies are fighting a stubborn Taliban insurgency. "The prime minister has approved another six-month extension in the deadline," Imran Zeb Khan, the chief commissioner for Afghan Refugees, told Reuters in an interview. "But Pakistan can't ensure that these refugees will return. That cannot happen without support from Afghanistan and the international community which need to create the right conditions for their repatriation." Khan said Pakistan would hold a tripartite meeting with Afghanistan and the United Nations refugee agency on July 19 to plan the way forward. The comments came soon after officials told Reuters at least 500 Afghan refugees were arrested in a northwestern border province and deported as a security risk. Pakistan's Dawn newspaper reported that more than 2,000 refugees were arrested in the last month, and 400 deported to Afghanistan. There are only 100,000 registered refugees in Khyber Pakhtunkhwa province, the site of the arrests, said provincial information minister Mushtaq Ahmad Ghani. "We don't suggest any aggressive campaign against Afghan refugees, but we have been hosting them for the past 35 years and it is time they should go back to their country," Ghani said. Unregistered Afghans had become a major security issue for the government, he added. About 6,000 Afghans have chosen to return home from Pakistan in 2016, well below last year's figure of 58,211, the United Nations' refugee agency has said. Registration cards allowing a temporary legal stay for Afghan refugees last received a six-month extension after they expired in December 2015. Many Afghans have lived in Pakistan for decades and contribute significantly to its labor force. But Afghan refugee camps have become "safe havens for terrorists," Pakistani foreign policy chief Sartaj Aziz told a Pakistani television channel last week. Pakistani federal minister for states and frontier regions Abdul Qadir Baloch also warned that Pakistan was not willing to host Afghan refugees indefinitely. Visiting Pakistan last week, United Nations High Commissioner for Refugees Filippo Grandi said he had made the case to the government for extending the June 30 deadline.