Information Minister Sheikh Rashid Ahmed said it was a "suicide bomber" and blamed the attack on the "enemies of Pakistan and Islam".
Earlier reports had indicated that the cause of the explosion could have been a device planted in the mosque.
President General Pervez Musharraf condemned the attack as the worst in the capital for years and appealed for his countrymen to unite against "religious terrorism, sectarianism and extremism".
According to witnesses most of the victims were Shia Muslims.
Security stepped up
The federal government instructed all four provinces to provide more protection to places of worship.
The blast occurred at 11.20am (0620 GMT) on Friday at the Bari Imam shrine, which is close to Pakistan's main government buildings and the diplomatic enclave, where many embassies and diplomatic residences are.
Many of the bodies were in pieces
making them hard to count
The shrine was seen as a symbol of harmony between the two communities.
An AP photographer at the scene counted at least 20 bodies, many of them in pieces, making it hard to give an exact figure. An intelligence official said at least 20 were killed and 150 wounded.
Shia leader unharmed
The blast ripped through a congregation of hundreds of
Shia worshippers under a canvas tent put up to shade them from the sun.
They were preparing for the arrival of Shia leader Hamid Moasvi, a vehement critic of the US-led war on terrorism, who was about to deliver a sermon.
Musharraf condemned the attack
and appealed for unity
"There was an announcement that Hamid Moasvi is coming.
Everybody stood up and then there was the explosion," said
Mohammed Ali, who was among the congregation.
"Afterward, you couldn't identify anyone," said Ali. "Some had their legs blown off, some had their hands blown off. I lifted so many of the people and my clothes were soaked with blood." Moasvi was not hurt, witnesses said.
Eyewitnesses told Aljazeera's Pakistan correspondent Ahmad Zaidan that at least 30 people were killed and 100 others injured. Zaidan said most of the casualties were Shia.
Police officer Mohammed Sadique said the bomb exploded inside the shrine, where many Muslims have been congregating this week for a five-day festival ending on Friday.
The toll of the attack could be
as high as 30
He said mutilated bodies and body parts were scattered inside.
"There is blood all around," Mohammad Javed, who lives nearby, told AFP by telephone.
Mukhtar Kazmi, who was running a clinic at the shrine, said they treated about 200 people.
Police cordoned off the shrine and blocked access roads after the blast.
Hundreds of worshippers staged protests at the shrine and clashed with police after officers baton-charged the crowd to clear the way for ambulances.
Ahmed confirmed the blast was
triggered by a bomber
Many of the protesters also chanted, "Down with America".
"Our initial information suggests it was a suicide attack," Islamabad police chief Talat Mehmood Tariq said.
"A man came into the congregation and apparently blew himself up," a witness said.
Sectarian attacks are common in Pakistan. Sunnis make up about 80% of its 150 million people, and Shia about 17%. Most live peacefully together, but hardline elements on both sides have a violent agenda.
The schism dates back to a 7th-century dispute over who was the true heir to the Prophet Muhammad.
The Sunni custodian of the shrine and two other people were shot dead near the compound in February. Early this month, police said they had killed the suspects in custodian Raja Akram's death.
Both sects claim the shrine is theirs, but it has been controlled by Sunnis for the past two decades.