Pakistani Prime Minister Nawaz Sharif has allowed registered Afghan refugees to remain in the country until the end of the year, as an earlier deadline is set to expire.

In a statement late Wednesday, the government says Sharif has directed authorities to immediately engage the U.N. refugee agency and the Afghan government for gradual relocation of refugee camps in Pakistan to Afghanistan.

Pakistan is currently hosting at least 1.5 million refugees. An additional 1 million unregistered Afghans are staying in many parts of Pakistan since 1980s, when they escaped violence at home.

The decision to extend the stay of the refugees was announced at the request of the U.N. High Commissioner for Refugees.