At least 63 people were killed and 182 wounded in an explosion targeting a wedding in the Afghan capital, authorities said on Sunday.
The blast, which took place late on Saturday in west Kabul, came as Washington and the Taliban are in the final stages of a deal to reduce the US military presence in Afghanistan.
The militant Islamic State (IS) group claimed responsibility for the attack, underling the dangers the country faces even if the Taliban agree a pact with the US.
The group, in a statement on the messaging website Telegram, claimed responsibility for the attack at a west Kabul wedding hall, in a minority Shia neighbourhood, saying its bomber had been able to infiltrate the reception and detonate his explosives in the crowd of “infidels”.
IS has claimed some of the most bloody attacks in Afghan cities over the past couple of years, with some aimed at the Shia minority.
The Taliban had earlier denied responsibility for the Kabul attack and condemned it.
Meanwhile, Afghan President Ashraf Ghani said the Taliban could not escape blame for the "barbaric" suicide bomb attack.
"The Taliban cannot absolve themselves of blame for they provide platform for terrorists," Ghani said in a post on Twitter.
Interior ministry spokesman Nasrat Rahimi provided the toll, which is the highest in Kabul in recent months.
"Among the wounded are women and children," Rahimi said.
Afghan weddings are epic and vibrant affairs, with hundreds or often thousands of guests celebrating inside industrial-scale wedding halls where the men are usually segregated from the women and children.
In the aftermath of Saturday's attack images from inside the hall showed blood-stained bodies on the ground along with pieces of flesh and torn clothes, hats, sandals and bottles of mineral water.
The wedding was believed to be a Shia gathering. Shias are frequently targeted in Sunni-majority Afghanistan, particularly by the so-called militant Islamic State group, which is also active in Kabul but did not immediately issue any claim of responsibility.
Mohammad Farhag, who had been at the wedding, told AFP he had been in the women's section when he heard a huge blast in the men's area.
"Everyone ran outside shouting and crying," he said.
"For about 20 minutes the hall was full of smoke. Almost everyone in the men's section is either dead or wounded."
Two hours after the blast, he said bodies were still being removed from the hall.
A mobile phone video which swiftly went viral shortly after the attack showed one man outside the hall with bloodstains on his clothes, his voice breaking as he explained he was searching for his brothers.
One guest who spoke to Tolo News said some 1,200 people had been invited.
The attack sent a wave of grief through a city grimly accustomed to atrocities.
'Henious and inhumane attack'
Messages of shock poured in following the attack.
In a statement issued by the Foreign Office spokesperson, Pakistan condemned the attack.
"More than 60 innocent people have reportedly lost their lives in this dastardly inhuman act," the statement read.
While offering condolences to the families of the victims, the statement added: "Pakistan condemns terrorism in all its forms and manifestations. Terrorism is a common threat for the entire region and must be defeated together."
"This heinous and inhumane attack is indeed a crime against humanity," Afghanistan's Chief Executive Abdullah Abdullah said.
"Such acts are beyond condemnation," the European Union mission to Afghanistan said.
"Devastated by the news of a suicide attack inside a wedding hall in Kabul. A heinous crime against our people; how is it possible to train a human and ask him to go and blow himself (up) inside a wedding?!!" Sediq Seddiqi, spokesman for President Ashraf Ghani, said in a Twitter post.
Withdrawal deal expected
Insurgents have periodically struck Afghan weddings, which are seen as easy targets because they frequently lack rigorous security precautions.
On July 12, at least six people were killed when a suicide bomber attacked a wedding ceremony in the eastern Afghan province of Nangarhar. IS, which has a growing footprint in the region, claimed the blast.
Expectations are rising for a deal in which the United States would start withdrawing its approximately 14,000 soldiers from Afghanistan after a two-decade war that has turned into a stalemate.
In return, the Taliban would commit to various security guarantees, including that the Islamist hardliners who long harboured Al-Qaeda would not allow Afghanistan to once again become a jihadist safe haven.
Many Afghans fear the deal could see the Taliban return to some form of power, eroding hard-won rights for women in particular, or the country descend further into a brutal civil war.
Additional reporting by Naveed Siddiqui