Pakistan expects its military operation to defeat Taliban militants in the Swat valley region to be over in the next few days.
"Only five to 10% of the job is remaining and hopefully within two to three days, the pockets of resistance will be cleared," Syed Athar Ali, secretary of defence for Pakistan, said at a regional defence meeting in Singapore.
His comments came after the military said on Saturday that Pakistani forces had regained full control of Mingora, a week after re-entering the main town in the Swat valley to dislodge thousands of Taliban fighters.
Recapturing Mingora, 130 km northwest of Islamabad, would raise the prospect that some of more than two million people who have fled the conflict zone could soon begin to go home, alleviating a humanitarian crisis.
Around 300,000 people lived in Mingora until the Taliban occupied the town in early May when the army first launched an offensive in Swat, an alpine valley in the country's northwest.
The military said on Saturday that medical teams and food supplies have arrived in Mingora. Gas supplies have been restored, but electricity repairs would take at least two weeks.
Government forces began the offensive on 2 May.