The explosion occurred soon after police fired tear gas to disperse hundreds of protesters who for several hours took control of the mosque which the government reopened to the public Friday — two weeks after a bloody army siege dislodged militants.
There was no claim of responsibility for the bombing, but Islamic militants will be suspected as behind what is the latest in a string of attacks to hit Pakistan since the army operation at the Lal Masjid, or Red Mosque, in the Pakistani capital left at least 102 people dead.
Amir Mehmood, a witness, said the blast went off inside the Muzaffar Hotel, located in a crowded market area about a half-kilometer (quarter mile) from the mosque. He said he saw blood, body parts, and shreds of the Punjab police uniform inside the hotel.
Neighboring shops and food stalls were also hit by the blast.
"I heard the blast and I came running. A policeman got blown into the air and landed away from the blast site," said another witness, Imtiaz Ahmed.
Khalid Pervez, Islamabad's top administrator, said 13 people were killed, including seven police, and 71 were wounded.
Explosive experts collected parts from the torso of a man's mutilated body that they suspected was the bomber's, a senior police officer said on condition of anonymity because he was unauthorized to make media comments.
Interior Ministry spokesman Javed Iqbal Cheema said investigators had also recovered a head believed to be that of the attacker.
"We strongly believe that the head is of the suicide bomber," he said.
Cheema said the government had received intelligence information about a possible suicide bombing in Aabpara, the market area where the hotel is located. "There will be an inquiry for the security lapse," he said.
Earlier Friday, protesters had occupied the mosque after forcing the retreat of a government-appointed cleric who was assigned to lead Friday prayers there.
Police largely stood by as the demonstrators clambered onto ladders and the roof, and began splashing red paint onto the walls to restore the mosque's namesake color after a government restoration left it pale yellow. They also rose a black flag with two crossed swords — meant to symbolize jihad, or holy war.
But street battles erupted when religious students and other supporters of the mosque's pro-Taliban former clerics threw stones at dozens of police in riot gear on a road outside the mosque. After protesters disregarded police calls to disperse peacefully, police fired the tear gas, and scattered the crowd which mostly fled back inside the mosque compound.
The protesters demanded the return of the mosque's former chief cleric, Abdul Aziz — who is currently in government detention — and shouted slogans against President Gen. Pervez Musharraf. Later a cleric from a seminary associated with the mosque led the prayers.
"Musharraf is a dog! He is worse than a dog! He should resign!" students shouted. Some lingered over the ruins of a neighboring girls' seminary that was demolished by authorities this week. Militants had used the seminary to resist government forces involved in the weeklong siege that ended July 12.
The crowd also shouted support for the mosque's former deputy cleric, Abdul Rashid Ghazi, who led the siege until he was shot dead by security forces after refusing to surrender. He had spearheaded a vigilante, Islamic anti-vice campaign that had challenged the government's writ in the city.
"Ghazi your blood will lead to a revolution," the protesters chanted.
Over mosque loudspeakers, protesters were vowing to "take revenge for the blood of martyrs" although some other speakers urged calm after the unrest broke out.
After the bombing, police retook control of the mosque, said Zafar Iqbal, the city police chief. Some protesters resisted and about 50 people were arrested.
Friday's reopening was meant to help cool anger over the siege, which triggered a flare-up in militant attacks on security forces across Pakistan. Public skepticism still runs high over the government's accounting of how many people died.
Earlier, in a speech at the main entrance of the mosque, Liaqat Baloch, deputy leader of a coalition of hard-line religious parties, the Mutahida Majlis-e-Amal (MMA), condemned Musharraf as a "killer." He declared there would be an Islamic revolution in Pakistan.
"Maulana Abdul Aziz is still the prayer leader of the mosque. The blood of martyrs will bear fruit. This struggle will reach its destination of an Islamic revolution. Musharraf is a killer of the constitution. He's a killer of male and female students. The entire world will see him hang," Baloch said.
Pakistan's Geo television showed scenes of pandemonium inside the mosque, with dozens of young men in traditional Islamic clothing and prayer caps shouting angrily and punching the air with their hands.
Officials were pushed and shoved by men in the crowd. One man picked up shoes left outside the mosque door and hurled them at news crews recording the scene.
Maulana Ashfaq Ahmed, a senior cleric from another mosque in the city who was assigned by the government to lead Friday's prayers, was quickly escorted from the mosque, as protesters waved angry gestures at him.
Security was tightened in Islamabad ahead of the mosque's reopening, with extra police taking up posts around the city and airport-style metal detectors put in place at the mosque entrance used to screen worshippers for weapons.
Despite questions over Musharraf's will, and ability, to tackle the apparent extremist revival gripping his country, the military ruler reiterated Friday his insistence that U.S. troops would not be allowed on Pakistani soil to help in the fight.
"It is very clear that here on Pakistani territory only Pakistani troops will operate. Nobody should have any doubt," Musharraf told journalists before leaving to visit Saudi Arabia and the United Arab Emirates, reports CBS News' Farhan Bokhari.