No group immediately claimed responsibility for the explosion, which also wounded at least 27 people, but Pakistan has struggled over the past months with a resurgent Pakistani Taliban.