Afghan refugees in Pakistan can remain in the country until the end of the year.
The decision by Prime Minister Nawaz Sharif comes after an earlier deadline of June 30 for Afghan refugees to leave the country was set to expire.
Pakistan is currently hosting at least 1.5 million Afghan refugees.
In a statement late on June 29, the government said Sharif had ordered authorities to work with the UN refugee agency and the Afghan government to gradually relocate the refugee camps from Pakistan to Afghanistan.
Islamabad says a number of militants are hiding in the refugee camps.
The UN high commissioner for refugees, Filippo Grandi, visited Pakistan this week. He announced that an assistance package for Afghan refugees who decide to return home will double from $200 to $400.
Grandi on June 29 praised Pakistan for generously hosting Afghan refugees.