Both the Taliban and Isis (Islamic State) have claimed responsibility for an attack that killed at least 70 people died when a suicide bomb tore through a crowd of mourners gathered at a Pakistani hospital.
Prime Minister Nawaz Sharif called for security forces to "decimate" terrorists after the blast at the Civil Hospital in the Balochistan provincial capital Quetta, which also wounded more than 100 people.
Video footage showed bodies strewn on the ground among pools of blood and shattered glass as shocked survivors cried and tried to comfort one another.
The bomber struck a crowd of some 200 people who had gathered on Monday to mourn the death of a senior local lawyer who had been assassinated earlier in the day.
Many of the victims were clad in the black suits and ties traditionally worn by Pakistani lawyers.
An AFP journalist was about 20m away when the bomb went off.
"There were huge black clouds and dirt," he said. "I ran back to the place and saw dead bodies scattered everywhere and many injured people crying. There were pools and pools of blood around and pieces of human bodies and flesh."
Nurses and lawyers wept as medics from the hospital rushed out to help dozens of injured, he said.
Pervez Masi, who was injured by pieces of flying glass, said the blast was so powerful that "we didn't know what had happened". "Whoever is doing this is not human, he is a beast and has no humanity."
Bomb disposal unit chief Abdul Razzaq told AFP it was a suicide attack. "The bomber had strapped some 8kg of explosives packed with ball bearings and shrapnel on his body," he said.
The head of the provincial health department, doctor Masood Nausherwani, gave a death toll of 70, with 112 injured.
A faction of the Pakistani Taliban, Jamaat-ul-Ahrar, claimed responsibility for both the assassination of the lawyer and the blast at the hospital.
A spokesman vowed it would carry out more attacks "until the imposition of an Islamic system in Pakistan".
Hours later, Isis also said it was behind the blast, which it claimed killed 200 people, the SITE monitoring agency reported.
Isis, whish has strongholds in Iraq and Syria and followers around the world, has been scrabbling for purchase in Pakistan, largely due to competition from well established extremist groups such as the Taliban.
Sharif, who flew to Quetta just after the attack, said "all state security institutions must respond with full might to decimate these terrorists".
The bombing targeted a crowd made up mainly of lawyers and journalists who had gone to the hospital to mourn the president of the Balochistan Bar Association, who was shot dead on Monday.
Bilal Anwar Kasi was attacked by two unidentified gunmen as he left his home for work.
UN Secretary-General Ban Ki Moon condemned the attack, saying it was "particularly appalling" that it targeted mourners at a hospital.
France's President Francois Hollande denounced the "abominable act", while the European Union said there was "no justification for such acts of terrorism".
The US joined the chorus of condemnation, which the State Department said had targeted "two of the most important pillars of every democracy" - the judiciary and the media.
Pakistan is grimly accustomed to atrocities after a nearly decade-long insurgency.
Pakistani hospitals have been targeted by militants before, with a bomb killing 13 at a Karachi hospital in 2010.