Pakistani forces have killed and arrested dozens of suspects in sweeping raids as the death toll from a massive suicide bombing by Islamic State that targeted a famed shrine rose to 88.
Pakistan's deadliest terror attack in years stunned the nation and raised questions about authorities' ability to rein in militant groups despite several military offensives.
It also threatened to drive a deeper wedge between Pakistan and Afghanistan. Islamabad quickly lashed out at Kabul, saying the bombing was masterminded in militant sanctuaries across the border in Afghanistan.
Pakistan also fired a round of artillery shells into Afghan territory on Friday and shut down the Torkham border crossing, a key commercial artery between the two neighbours.
Afghan President Ashraf Ghani condemned the shrine attack in Sehwan. "Sufis always preach peace and brotherhood among people," he said in a statement, adding that "terrorists once again proved that they have no respect for Islamic values".
Raids overnight across Pakistan targeted militant hideouts and led to shootouts with insurgents that left at least 39 suspects dead, according to security officials.
Most of the operations were carried out by the paramilitary Rangers. In one raid, troops killed 11 suspects at a militant hideout in the port city of Karachi. In another, the Rangers came under fire as they were returning from Sehwan, and killed seven attackers.
Other raids took place in north-western Pakistan and also in the eastern province of Punjab. Officials said 47 suspects were arrested.
In Thursday's attack, the suicide bomber walked into the main hall at the Lal Shahbaz Qalandar shrine in Sehwan, and detonated his explosives among a crowd of worshippers, initially killing 75. At least 20 women and nine children were among the dead.
On Friday, authorities raised the death toll to 88 after some of the critically wounded died. Sindh provincial health department said 343 people were wounded but most were discharged after treatment, while 76 still remain in hospital.
Islamic State said it targeted a "Shiite gathering". The Sunni extremist group views Shiites as apostates and has targeted Pakistan's Shiite minority in the past. It also views Sufi shrines as a form of idolatry.
The Sehwan shrine, which reveres a Muslim Sufi mystic, is frequented by the faithful of many sects of Islam but the majority of the worshippers are usually Shiites.
Local TV showed graphic footage of the aftermath of the blast, with wounded worshippers crying out for help and the floors covered with shoes, blood and body parts. Women cried and beat their chests in grief.
Prime minister Nawaz Sharif vowed that security forces would track down the perpetrators, according to Pakistani state TV.
"Each drop of the nation's blood shall be avenged, and avenged immediately," said army chief General Qamar Javed Bajwa.
The attack was the deadliest in Pakistan since an assault on an army-run school in Peshawar that killed 154 people, mostly schoolchildren, on December 16 2014. A Taliban-linked group, Jamaat-ul-Ahrar, claimed that attack.
Pakistan has been at war with the Taliban and other extremist groups for more than a decade. In recent years it has launched major offensives against militant strongholds in the tribal regions along the border with Afghanistan, but insurgents have continued to carry out attacks elsewhere in the country.
IS has been expanding its presence in Pakistan in recent years and has claimed a number of attacks, including a suicide bombing at another Sufi shrine in November that killed more than 50 people.
Also on Friday, the Pakistani military handed over to Kabul a list of 76 suspected "terrorists" allegedly hiding in Afghanistan, demanding they be captured and extradited to Islamabad.
In Sehwan, police fired tear gas and swung batons to disperse a rally of several hundred protesters who demanded justice for the victims and better security measures from the government.
The crowd set fire to a car before the police broke up the rally.