President Pervez Musharraf says he is determined that extremism and terrorism will be eradicated in Pakistan.
He was speaking in a televised address to the nation after officials said 75 bodies had been found at the radical Red Mosque in Islamabad.
Troops launched a 36 hour attack on the mosque early on Tuesday to flush extremists out of the mosque complex.
For months clerics and students had been defying the authorities in their campaign for Sharia law in the capital.
Students had kidnapped police as well as Islamabad residents they considered to be engaged in un-Islamic activity.
'Madrassa a fortress'
Gen Musharraf praised Pakistan's security forces for freeing the Red Mosque in Islamabad "from the hands of terrorists".
The outcome of this episode will determine the future of war against terror
"Unfortunately we have been up against our own people... they had strayed from the right path and become susceptible to terrorism."
"What do we want as a nation want?" President Musharraf asked. "What kind of Islam do these people represent?"
"In the garb of Islamic teaching they have been training for terrorism... they prepared the madrassa as a fortress for war and housed other terrorists in there.
"I will not allow any madrassa to be used for extremism."
Gen Musharraf said those members of the military who died had given their blood for the country.
He insisted that his government had acted with restraint and had acted only when negotiations had broken down.
A short while earlier, officials said the bodies of 19 people, charred beyond recognition, were among the 75 bodies found in the mosque complex, which includes a religious school for women and girls.
An army spokesman said five of the charred bodies were of people killed by a suicide bomber in a locked room.
There are fears women and children may be among the victims but immediate confirmation is impossible.
Ten soldiers were killed in the operation. Officials say one suicide bomber was inside the buildings.
Click to view image: '70738-musharraf.jpg'
|Liveleak on Facebook|