Pakistan's army has said it has cleared most of the restive north-western Swat valley of pro-Taleban militants.
Troops are set to chase the militants further into the mountains
Troops were pursuing several hundred hardcore supporters of cleric Maulana Fazlullah in the region's mountains, the army's head of operations said.
He said 290 militants had been killed and 143 arrested in recent weeks.
The fighting in Swat is the first serious insurgent threat from pro-Taleban forces in what is considered a settled area of Pakistan.
Until now the army has focused on fighting militants mainly on the largely autonomous Waziristan tribal areas along the Afghan border.
'Still on the run'
Forces loyal to Maulana Fazlullah, including some foreign fighters, had taken control of a series of small towns and villages, and tried to implement strict Islamic law.
But Maj-Gen Nasser Janjua said some 20,000 troops backed by helicopter gunships and artillery had now cleared the militants from all but a few mountain areas.
"Fazlullah is still on the run with hardcore militants estimated to be between 200 to 400, including some foreigners," he said.
"The militants have retreated to two places in the mountains in the northwest of the valley and we will chase them there."
Only five troops and six civilians have been killed, and 20 civilians wounded, he said.