No one claimed responsibility, but the blast bore the hallmarks of Sunni extremists blamed for a string of other bloody strikes against Pakistan's Shiite minority in recent months.
The spike in sectarian violence is adding to the sense of crisis in the nuclear-armed country as it grapples with rising attacks by al Qaeda and Taliban militants based in tribal lands close to the Afghan border.
Witnesses said the suicide bomber barged into a 1,000-strong crowd streaming toward a graveyard in Dera Ismail Khan and then detonated his explosives. The crowd was mourning Sher Zeman, a Shiite leader who was gunned down in the city the day before.
The blast left bodies, shoes and torn clothing littering the bloodstained street. Some of the dead and wounded were taken to hospitals in wooden handcarts because there were not enough ambulances.
Soon after, gunfire broke out and angry Shiites fired on police officers rushing to the scene, police official Ishtiaq Marwat. One public bus was torched by rioters.
At least 30 people were killed in the blast, while three more were shot dead in the riots, said Dr. Farid Mahsud, who was treating some of the more than 60 wounded at the city's main hospital. By nightfall, troops patrolling the streets had restored order, said police official Nemat Ullah.
Extremists from the majority Sunni community regard Shiites as heretical, and the two groups have long engaged in tit-for-tat killings in Pakistan. Attacks have risen in recent years along with the rise in violence by al Qaeda and the Taliban, which are also Sunni groups.
Analysts say those militants are inspiring the sectarian violence and likely directing or supporting some of it.
Fayyaz Hussain, a Shiite leader in Dera Ismail Khan, said extremists are trying to start a wider sectarian conflict in the city, which has often been hit by sectarian attacks.
"This attack is yet another attempt to force us to leave Dera Ismail Khan, but we will face the situation and will stay here," Hussain said.
Many of the sectarian attacks have been in or close to the northwest, where Sunni militant groups have seized control of swaths of territory despite a series of military offensives.
On Monday, Pakistan announced it would agree to the imposition of Islamic law in the restive Swat valley in the northwest of the country as part of an agreement aimed at restoring peace after an 18-month military campaign. The pact was spearheaded by hard-line cleric Sufi Mohammed who is negotiating with the Taliban in the valley to give up their arms.
Friday's attack prompted a senior Western diplomat, based in Islamabad, to warn against deals like the one Pakistan's government made in Swat.
"Every time you give some concessions to these people, they are going to demand more. The Swat agreement is a mistake," said the diplomat, who spoke to CBS News Friday on the condition of anonymity.
"The attack in Dera Ismail Khan shows us that these militants are not people you can easily negotiate with. Conciliation with this group while they keep on carrying out such bloody attacks simply doesn't make sense," cautioned the diplomat.
A spokesman for Mohammed said talks with militant leader Maulana Fazlullah on Friday had gone well.
"We will soon give good news to the people," spokesman Ameer Izzat Khan said.
The government has rejected criticism that the pact would create a Taliban sanctuary less than 100 miles from the capital, Islamabad, insisting it is committed to combating terrorism and extremism.
But Richard Holbrooke, the new U.S. envoy for Afghanistan and Pakistan, said Thursday that he raised concern about the deal during a phone call with Pakistan's president.
Holbrooke told CNN that President Barack Obama was worried "that this deal, which is portrayed in the press as a truce ... does not turn into a surrender."
He said Zardari told him during Thursday's phone call that the pact was an "interim arrangement" while Pakistan stabilizes the situation.
"He doesn't disagree that the people who are running Swat now are murderous thugs and militants and they pose a danger not only to Pakistan, but to the United States and India," Holbrooke said.