Joy and celebration turned into horror and carnage when an Islamic State suicide bomber targeted a packed Afghan wedding hall, killing at least 63 people in the deadliest attack to rock Kabul in months, officials and witnesses said Sunday.

The massive blast, which took place late Saturday in west Kabul, underscores both the inadequacy of Afghanistan's security forces and the scale of the problem they face as Washington and the Taliban finalise a deal to reduce the US military presence in Afghanistan and hopefully build a roadmap to a ceasefire.

The groom recalled greeting smiling guests in the afternoon, before seeing their bodies being carried out hours later.

The attack "changed my happiness to sorrow", the young man, who gave his name as Mirwais, told local TV station Tolo News.

"My family, my bride are in shock, they cannot even speak. My bride keeps fainting," he said.

"I lost my brother, I lost my friends, I lost my relatives. I will never see happiness in my life again."

Interior ministry spokesman Nasrat Rahimi said a suicide bomber carried out the attack, with at least 63 people killed and 182 injured.

"Among the wounded are women and children," Rahimi said.

Afghan weddings are epic and vibrant affairs, with hundreds or often thousands of guests celebrating for hours inside industrial-scale wedding halls where men are usually segregated from women and children.

"The wedding guests were dancing and celebrating the party when the blast happened," recounted Munir Ahmad, 23, who was seriously injured and whose cousin was among the dead.

"Following the explosion, there was total chaos. Everyone was screaming and crying for their loved ones," he told AFP from his bed in a local hospital, where he was being treated for shrapnel wounds.

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 huge blast ripped parts of the ceiling off.

Story continues

The wedding was largely a gathering of Shia Muslims, who frequently are targeted in Sunni-majority Afghanistan, particularly by IS.

The Sunni extremist group's Afghan affiliate claimed responsibility for the blast, saying the bomber targeted the wedding because it was Shia.

Wedding guest Hameed Quresh told AFP the young bride and groom were saying their vows when the bomb went off.

"We fainted following the blast, and we don't know who brought us to the hospital," sobbed Quresh, who lost one brother and was himself wounded.

Another guest told Tolo that about 1,200 people had been invited. With low security, weddings are seen as easy targets.

The attack sent a wave of grief through a city grimly accustomed to atrocities and garnered broad condemnation.

President Ashraf Ghani called it "barbaric", while Afghanistan's chief executive Abdullah Abdullah described it as a "crime against humanity".

As a sign of mourning, Ghani postponed celebrations which were scheduled for Monday to mark 100 years of Afghan independence from Britain.

- Withdrawal deal expected -

While the police and army claim they prevent most bombings from ever happening, insurgents pull off horrific attacks with chilling regularity.

On July 28, at least 20 people were killed when attackers targeted Ghani's running mate Amrullah Saleh during presidential election campaigning.

The issue also goes to the heart of a prospective deal between the US and the Islamist extremist Taliban that would see Washington begin to withdraw its approximately 14,000 soldiers from Afghanistan.

Several US sources suggested in recent days that an agreement could be imminent, but some points remain to be resolved.

US peace envoy Zalmay Khalilzad, who condemned the "heinous attack" on the wedding party, could return to the region in the coming days to continue or even finalise the negotiations.

"We must accelerate the Afghan Peace Process including intra-Afghan negotiations. Success here will put Afghans in a much stronger position to defeat ISIS," he tweeted.

The deal relies on Taliban guarantees they will stop jihadist groups such as Al-Qaeda and IS from using Afghanistan as a safe haven.

Saturday's attack suggests any such promise would be tough to keep.

The "Taliban cannot absolve themselves of blame, for they provide platform for terrorists," Ghani said.

Few believe such a deal will bring quick peace and Afghans fear the Taliban could return, eroding hard-won rights for women and leading to a spiralling civil war.

In the northern province of Balkh, a roadside bomb killed 11 members of the same family, officials said, blaming the Taliban.