An explosion apparently targeting a mosque in Pakistan's northwestern city of Parachinar, in a remote area bordering Afghanistan, killed at least 22 people on Friday and wounded dozens, officials said.
There was no immediate claim of responsibility but the blast, which took place as people gathered for Friday prayers near the women's entrance of a Shia mosque in the central bazaar, follows a series of attacks this year.
The local political agent, Ikramullah Khan, said the death toll had reached 22, with 70 injured.
A parliamentarian from Parachinar, Sajid Hussain, said gunfire preceded the blast, which he described as a suicide attack.
"The attack took place in a busy area and a women's mosque appears to be the target," he 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 Islamic State.
In January, at least 21 people were killed when an explosion hit a vegetable market in Parachinar, capital of the Kurram tribal region, where Pakistani security forces have battled militant groups for years.
Authorities in mainly Sunni-Muslim Pakistan said a military rescue helicopter had been sent to the scene to help evacuate the injured.
Mumtaz Hussain, a doctor at the Agency Headquarters Hospital in the region, said five bodies, including a woman and two children, and more than three dozen wounded had been brought to the hospital and an appeal for blood donors had been made.
"Patients are being brought to us in private cars and ambulances and we have received over three dozen patients so far," Hussain told Reuters.
The 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".
In a statement, he said: "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."