Troops are set to chase the militants further into the mountains
A leading Pakistani militant has been released following a peace deal, the Pakistani government says.
Maulana Sufi Mohammad was arrested in Pakistan in November 2001 after returning from Afghanistan.
He had led thousands of tribal men into Afghanistan to support the Taleban in their fight against US-led forces.
He was freed after being taken from his hospital bed for talks in Peshawar with the chief minister of North West Frontier Province (NWFP).
The new government in Pakistan has said it is ready to negotiate with any militants who are prepared for reconciliation.
Maulana Sufi Mohammad was released after eight leaders of his Tehrik Nifaz-e-Shariat Mohammadi (TNSM) movement signed a six-point peace agreement with the provincial government.
The agreement commits the group to creating conditions for "peace and restoration of the government's writ" in the Swat district of NWFP, where the army had been engaged in an intense struggle with militants.
Under one clause of the agreement, TNSM declared that the killing of police, military or other government employees was "un-Islamic".
The militants fighting in Swat have been led by Maulana Fazlullah, a close relative of Maulana Sufi Mohammad.
Correspondents say the release deal may undermine support for Maulana Fazlullah, who depended heavily on the followers of Maulana Sufi Mohammad.