Pakistani Prime Minister Yousuf Raza Gilani has called on people displaced by fighting against the Taliban in the north-west of the country to go home.
He said that the first phase of a four-part programme to return them would begin on 13 July.
It is the first time the PM has made such a call since the army offensive against the Taliban began in April.
The army, meanwhile, says that its operation in Malakand has entered its final phase.
Mr Gilani said that militants had already been "cleared" from Swat, Buner and part of Upper Dir.
Several hundred families from those areas have already begun to return to their homes, officials say.
"The electricity has been restored, the gas has been restored, the gas stations have been restored and even the banks have been restored," Mr Gilani said in a news conference.
It is estimated that at least two million Pakistanis have been displaced
"I congratulate the nation that from 13 July the displaced people will start returning to their homes," he said.
He said that the army would remain in the valley to ensure the Taliban did not return.
The BBC's M Ilyas Khan in Islamabad says that about two million people have been officially displaced since fighting resumed in April, with as many as 500,000 more who are not officially registered or are without proper identification.
Plans drawn up by the army's Special Support Group envisage the first batch of displaced people - those living in camps - will return on 13 July.
They will then be followed by those living in government buildings - including schools - and then by those living with friends and relations. The final group of people scheduled to return are those who have moved away from north-west Pakistan.
Our correspondent says that the overwhelming majority of displaced people either live in government buildings or schools, or are being looked after by what are called "host families" in Swabi and Mardan.
The army says that it it continuing to inflict heavy casualties on the Taliban in the north-west. On Wednesday it said that senior Taliban leader Maulana Fazlullah had been wounded in the fighting.
On Thursday it said that another Taliban leader, Omar Zadah, had been killed.