A car bomb exploded near a Shia mosque in the northwestern town of Parachinar on Friday, killing at least 22 people and wounding over 70 others, officials said.
Mushtaq Ghani, a spokesman for the provincial government, said the attack was near the central market as worshippers gathered for Friday prayers.
Jamaat-ul-Ahrar, a breakaway faction of the Pakistani Taliban militant group claimed responsibility for attack.
The blast also damaged vehicles and nearby shops, government administrator Zahid Hussain said.
He said authorities have declared an emergency and rescuers were transporting the dead and wounded to nearby hospitals.
Parachinar is a key town in the Kurram tribal region bordering Afghanistan and has been racked by violence in the past.
Officials said residents gathered and chanted slogans condemning the government. Security forces fired shots into the air to disperse the crowd.
Attacks undermines hopes of ending militant violence
Recent attacks have shattered hopes that Pakistan may have come through the militant violence that has scarred its recent history and increased pressure on Prime Minister Nawaz Sharif's government to show it was improving security.
Sharif condemned the attack and said the government would keep up efforts to "eliminate the menace of terrorism."
"The network of terrorists has already been broken and it is our national duty to continue this war until the complete annihilation of the scourge of terrorism from our soil," the prime minister said.
Last month, more than 80 people were killed and dozens wounded in an attack on a crowded Sufi shrine in southern Pakistan that was claimed by Daesh.
In January, at least 21 people were killed when an explosion hit a vegetable market in Parachinar, where Pakistani security forces have battled militant groups for years.