PM Khan said government will issue passports and ID cards to those born on Pakistani soil.

Karachi, Pakistan – Prime Minister Imran Khan has pledged to implement existing Pakistani laws that would grant citizenship to all Afghan and Bangladeshi refugees who were born on Pakistani soil, a major departure from previous policy.

Pakistan is home to more than 1.39 million registered Afghan refugees, according to United Nations High Commissioner for Refugees (UNHCR), many of whom have been resident in the country for more than 30 years.

There are also more than 200,000 ethnic Bangladeshis in Pakistan, most of whom live in the southern city of Karachi. Many of them were stranded in the city after the war in 1971 when Bangladesh, then East Pakistan, gained independence.

Afghan refugees, meanwhile, have poured into Pakistan from its western neighbour for decades, first fleeing the Soviet invasion in the 1970s, and then the civil war that ensued.

Since 2001, a fresh influx of refugees followed the US invasion of Afghanistan, and the subsequent Taliban war to take back the country.

“These poor migrants from Bangladesh, they have been here for more than 40 years, their children are grown now … we will give them passports and ID cards, as well as those Afghans whose children have been raised here, who were born here, we will also give them [citizenship],” said Khan in Karachi on Sunday.

“This happens in every country in the world, why is it that here we are inflicting such an injustice on these people?”

The announcement is a marked departure from the policy followed by previous governments, and could see the prime minister face confrontation with the country’s powerful military, which has often blamed Afghan refugees for violence in Pakistan.

Pakistani law allows citizenship for all those born in the country, with the exception of children of foreign diplomats, “enemy aliens” and those who migrated away from territories that became Pakistan after the partition of the subcontinent in 1947.

The legal status of Afghan refugees resident in Pakistan expires on September 30, although it is widely expected to be extended by the government, as has been done numerous times in the past.

Repatriation of refugees

The UNHCR welcomed the development, but said it was awaiting specifics on how Khan’s government intended to move forward.

“UNHCR welcomes the statement on Afghan children born in Pakistan,” spokesperson Dan McNorton told Al Jazeera. “We look forward to working closely with the government of Pakistan on this issue in the coming weeks.”

The Afghan government did not immediately comment.

Since 2014, Pakistan has been actively encouraging the repatriation of Afghan refugees, with the numbers of refugees returning spiking during that year.

Rights groups say Pakistani authorities have carried out a sustained campaign of intimidation and harassment of refugees since a 2014 attack on a Peshawar school killed more than 140 people, an attack that Pakistan blames groups based in Afghanistan for.

The rate of repatriation dropped last year, as violence spiked and the Afghan Taliban stepped up their attacks on civilian targets across the country.

This year, at least 9,821 Afghan refugees have repatriated to their homeland, according to UNHCR data. Birth rates among the refugee community, however, are high, and at least 14,682 Afghan refugee births were also recorded during the same period, the data shows.

Tense relations

Relations between the two neighbours have remained tense for years, with Afghanistan blaming Pakistan for hosting the Afghan Taliban leadership and its allies, a claim that Pakistan denies.

Pakistan claims Afghanistan has not acted against the Pakistan Taliban, which it claims is based in eastern Afghanistan.

On Saturday, Pakistani Foreign Minister Shah Mehmood Qureshi led a high-level delegation on a visit to Kabul, with both sides pledging their commitment to a new comprehensive dialogue framework.

Asad Hashim is Al Jazeera’s digital correspondent in Pakistan. He tweets @AsadHashim.