The bomb, hidden in a mound of garbage, went off as the procession from an imambargah (Shia prayer hall) on the outskirts of Dera Ismail Khan was on its way to the main procession in the city, witnesses and police officials said.
They said seven persons, including four children, were killed by the powerful blast. Two children and a policeman were among the 30 injured, who were taken to a nearby hospital.
Police officials said the bomb contained an estimated 10 kg of explosives and ball bearings. Footage on television showed the walls of several houses had been pitted by the ball bearings.
Soon after the blast, authorities further beefed up security in Dera Ismail Khan in Khyber-Pakhtunkhwa province.
The army was called out in the district. Officials said over 4,000 security personnel had been deployed in the area.
The attack occurred despite extensive security arrangements put in place by Interior Minister Rehman Malik, including the suspension of mobile phone services in nearly 50 cities and towns, including Karachi, Lahore and Quetta, and a ban on pillion riding in dozens of places.
In the southwestern city of Quetta, authorities imposed a complete ban on the riding of motorcycles. In Islamabad, authorities used helicopters to mount surveillance of Shia processions.