At least 44 people were killed and almost 200 wounded when suicide bomber blew himself up on Sunday at a political rally in Bajaur, north-west Pakistan bordering Afghanistan, a former stronghold of militants.
The blast took place during a convention hosted by the hardline religious party Jamiat Ulema-i-Islam-Fazl in Khyber Pakhtunkhwa, with senior party officials reported to be among the dead.
“We were listening to a bayan when a powerful explosion knocked me unconscious,” witness Rahim Shah told Pakistan's Dawn News. He said that when he regained consciousness, there was blood everywhere.
“People were screaming and even shots were fired."
Khyber Pakhtunkhwa Governor Haji Ghulam Ali confirmed the death toll, while district police officer Nazir Khan said local hospitals had declared a state of emergency because of the number of wounded. Army helicopters were used to help move the injured.
Images from the blast site on social media showed bodies strewn around the scene, and volunteers helping blood-soaked victims to ambulances.
No one immediately claimed responsibility for the attack, which officials have said is a suspected suicide bombing.
The local ISIS group has recently carried out attacks against the party.
After the blast, the US embassy in Islamabad expressed its condolences to the families and loved ones of the victims.
"We strongly condemn this heinous act of violence, which resulted in the loss of innocent lives and caused harm to many others," it said.
"Such acts of terror have no place in a peaceful and democratic society. We stand in solidarity with the people of Pakistan during this difficult time."
Last year, ISIS said it was behind attacks against religious scholars affiliated with the party, which has a huge network of mosques and madrassas in the north and west of the country.
Khyber Pakhtunkhwa is no stranger to attacks, and violence has become common since a truce between the government and the outlawed Tehreek-e-Taliban Pakistan broke down last year.
The province is also gripped by insurgent violence by Baloch separatists and there are frequent, large-scale Pakistani army operations in the rugged, mountain terrain to try to root out militants.
Six police officers were killed in gun and suicide bomb attacks in the provincial capital of Peshawar this month.
That attack was later claimed by the TTP, which is ideologically linked to the Afghan Taliban but operates as a separate organisation.
One hundred people were killed in a Peshawar mosque bombing in January, the deadliest since ISIS killed more than 64 people in a blast last March.
JUI-F chief Maulana Fazlur Rehman said the blast took place at about 4pm and he urged party supporters to remain "peaceful".
"JUI workers should remain peaceful and federal and provincial governments should provide the best treatment to the injured," Pakistan's GeoTV quoted Mr Rehman as saying.
Bajaur, once a tribal region but now a district, was a safe haven for Islamist militants until recent years, when the Pakistani military carried out operations to eliminate extremism from the area.
Militants still stage regular attacks against security forces and civilians.