A bomb blast tore through a Shiite Muslim mosque during evening prayers on Monday night, killing 16 people and wounding at least 30 others, officials said, one day after the assassination of a prominent Sunni cleric in this southern port city.

The attack at the Ali Raza mosque provoked violent clashes between angry mobs and police, who used tear gas to disperse the rioters. The protesters torched vehicles and buildings. Two people were killed and 20 others wounded in the fighting, authorities said.

The powerful explosion was heard for several miles around the mosque, located about a half-mile from where Nizamuddin Shamzai, the Sunni cleric, was gunned down Sunday morning. Body parts and debris rained over the busy evening traffic on the central M.A. Jinnah Road, witnesses said.

"We were in the middle of the prayers when a deafening sound was heard from the rear of the mosque," said Ali Sibtain Zaidi, 40, a carpenter who suffered head injuries in the blast. "Everybody was shouting for help," he said. "I don't know what happened later."

Karachi Mayor Naimatullah Khan said that ambulances were blocked by traffic from reaching the bomb scene and that most of the dead and wounded were transported to hospitals on motorbikes and in private cars.

"The blast ripped at least five people into pieces while most of the wounded brought to us had third-degree burns," said Azmat Ali Abdi, a physician at Liaquat National Hospital.

Manzur Mughal, senior superintendent of police for investigations in Karachi, said the attack on the mosque was thought to be in retaliation for the killing of Shamzai. "We have many reasons to believe that today's bombing was a response to yesterday's murder of Mufti Shamzai," he said.

The police chief, Asad Ashraf Malik, said a preliminary investigation indicated the blast was caused by about four pounds of C4 plastic explosives, detonated by remote control. The same type of device was used in a suicide attack at another Shiite mosque on May 7, in which 23 people were killed and 35 wounded, officials said.

Shamzai, according to several of his disciples, was a hard-line ideologue in his seventies who had met al Qaeda leader Osama bin Laden and was a supporter of the ousted Taliban government of Afghanistan. The followers said he was one of the few Sunni clerics from Pakistan invited to the 1998 wedding in Afghanistan of bin Laden's son, and that many ministers of the Taliban government had studied with him.

Much of the violence in Karachi has been blamed on Islamic militants who oppose support by the president, Gen. Pervez Musharraf, for the U.S. antiterrorism campaign in Afghanistan. But about 3,000 people have been killed in sectarian violence between Shiites and Sunnis in the last eight years. Sunnis make up about 80 percent and Shiites about 17 percent of Pakistan's population of 150 million.

People walk through the rubble of the Ali Raza mosque in Karachi. An explosion ripped through the Shiite mosque during evening prayers in the latest of a string of attacks in the southern Pakistani city. An official's sunglasses reflect the presence of Pakistani policemen guarding a Shiite Muslim mosque in Multan. Thousands of police and troops were deployed to prevent attacks after the killing of a Sunni cleric.