The suicide bomber stood in the middle of the dancing, clapping crowd as hundreds of Afghan children and adults celebrated a wedding in a joyous release from Kabul's strain of war. Then, in a flash, he detonated his explosives-filled vest, killing dozens — and Afghanistan grieved again.

The local Islamic State affiliate claimed responsibility for the deadliest attack in the capital this year, with 63 killed and 182 wounded, while outraged Afghans questioned just how safe they will be under an approaching deal between the United States and the Taliban to end America's longest war.

Stunned families buried the dead, some digging with their bare hands. One wounded survivor, Mohammad Aslim, still wore his bloodied clothes the day after the blast late Saturday. He and his friends had already buried 16 bodies, among them several close relatives, including a 7-year-old boy.

Aslim looked exhausted, and said he was waiting to bury more. Nearby, a man named Amanullah, who lost his 14-year-old son, said in anguish that the explosion had mangled the boy's face so badly he could no longer recognize it.

"I wish I could find the pieces of my son's body and put them as one piece into the grave," he cried.

The emergence of the Islamic State affiliate in recent years might be the greatest threat to Afghan civilians as the U.S. and Taliban seek an agreement to end nearly 18 years of fighting. While the U.S. wants Taliban assurances that Afghanistan will no longer be used as a launch pad for global terror attacks, there appear to be no guarantees of protection for Afghan civilians.

The Taliban, which the U.S. hopes will help curb the IS affiliate's rise, condemned Saturday's attack as "forbidden and unjustifiable."

The blast took place in a western Kabul neighborhood that is home to many in the country's minority Shiite Hazara community. IS, which declared war on Afghanistan's Shiites nearly two years ago and has claimed responsibility for many attacks targeting them in the past, said in a statement that a Pakistani IS fighter seeking martyrdom targeted a large Shiite gathering.

The wedding, at which more than 1,200 people had been invited, was in fact a mixed crowd of Shiites and Sunnis, said the event hall's owner, Hussain Ali.

Ali's workers were still finding body parts, including hands, in the shattered wedding hall, its floor strewn with broken glass, pieces of furniture and victims' shoes.

"We have informed the police to come and collect them," he said.

The bomber detonated his explosives near the stage where musicians were playing and "all the youths, children and all the people who were there were killed," said Gul Mohammad, another witness.

Survivors described a panicked scene in the suddenly darkened hall as people screamed and scrambled to find loved ones.

"I was with the groom in the other room when we heard the blast and then I couldn't find anyone," said Ahmad Omid, who said the groom was his father's cousin. "Everyone was lying all around the hall."

The blast at the wedding hall, known as Dubai City, shattered a period of relative calm in Kabul.

On Aug. 7, a Taliban car bomb aimed at Afghan security forces detonated his explosives on the same road, a short drive from the hall, killing 14 people and wounding 145 — most of them women, children and other civilians.

Kabul's huge, brightly lit wedding halls are centers of community life in a city weary of decades of war, with thousands of dollars often spent on a single evening.

Messages of shock poured in on Sunday. "Such acts are beyond condemnation," the European Union mission to Afghanistan said. "An act of extreme depravity," U.S. Ambassador John Bass said. A deliberate attack on civilians "can only be described as a cowardly act of terror," U.N. envoy to Afghanistan Tadamichi Yamamoto said.

The explosion came just ahead of Afghanistan's 100th Independence Day on Monday. The city, long familiar with checkpoints and razor wire, has been under heavier security. A planned event in Kabul marking the anniversary was postponed because of the attack, the president's office said.

The attack also comes at a greatly uncertain time in Afghanistan as the U.S. and the Taliban appear to be within days of a deal on ending the war after several rounds of talks this year. Afghanistan's government has been sidelined in those talks as the Taliban refuse to negotiate with what it calls a U.S. puppet.

Top issues in the talks have included a U.S. troop withdrawal and Taliban guarantees they would not allow Afghanistan to become a launching pad for global terror attacks. In that, the Islamic State affiliate's increasingly threatening presence is the top U.S. concern. Other issues include a cease-fire and intra-Afghan negotiations on the country's future.

Many Afghans fear that terror attacks inside the country will continue, and their pleas for peace — and for details on the talks — have increased in recent days. Few appear to believe that the Taliban will step in to protect civilians from IS or anyone else after years of killing civilians themselves.

"Taliban cannot absolve themselves of blame, for they provide platform for terrorists," President Ashraf Ghani said on Twitter, declaring a day of mourning and calling the attack "inhumane."

Frustration at the authorities was evident, as well amid a fresh wave of grief.

"We want the government to stop arguing about power and act like a human being to bring peace to this country," one worker at the wedding hall, Hajji Reza, said. Several of his colleagues remained missing.

Associated Press writer Maamoun Youssef contributed to this report.