At least 50 people were killed in a suicide attack on a religious celebration in Kabul on Tuesday, officials said, in one of the deadliest assaults to strike Afghanistan this year.

It follows a wave of bloody violence across the war-torn country in recent weeks that has killed hundreds of people as militants step up assaults amid a flurry of diplomatic efforts to end the 17-year conflict.

At least 72 people were wounded in the blast, health ministry spokesman Wahid Majroh said, which targeted religious scholars and leaders inside a wedding hall where hundreds had gathered to mark the birthday of Prophet Muhammad (PBUH) — one of the holiest days in the Islamic calendar.

An injured man is brought into a hospital in Kabul. —AP

Religious studies lecturer Mohammad Hanif said verses of the Quran were being recited when there was a deafening explosion followed by “chaos” inside the packed hall.

“More than 60 or 70 people were martyred,” Hanif, 31, told AFP outside a trauma facility run by Italian NGO Emergency. He escaped unhurt.

“They suffered burns, everyone in the halls was screaming for help.”

A photo posted on WhatsApp purportedly of the function room showed blood-splattered bodies, some with clothes partially ripped off by the force of the blast, overturned chairs and broken glass strewn over the floor.

President Ashraf Ghani declared Wednesday a national day of mourning for the victims of the attack, which he described in a statement as an “unforgivable crime”.

A manager of the multi-storey Uranus Wedding Palace, which also hosts political and religious functions, told AFP the suicide bomber blew himself up in the middle of the gathering of around 1,000 people.

“There are a lot of casualties — I myself have counted 30 casualties,” he told AFP on condition of anonymity.

The aid organisation Emergency said on Twitter 33 wounded and seven dead had been taken to its hospital in Kabul.

There was no immediate claim of responsibility for the blast, but the Islamic State group has claimed most recent suicide attacks in Kabul, which has become the most dangerous place in the country for civilians.

The Taliban condemned the attack in a WhatsApp message.

More bloodshed

It was the bloodiest assault in the Afghan capital since a twin bomb attack on a wrestling club in September that killed at least 26 people, and one of the deadliest in the country this year.

A suicide attack on Afghans protesting the appointment of a local police chief in the eastern province of Nangarhar in September killed at least 68 people and wounded another 165. No group claimed that explosion.

In January an ambulance packed with explosives detonated in a crowded street in the heart of Kabul, killing more than 100 people, mostly civilians.

The attack was claimed by the Taliban.

Last month's parliamentary elections sparked a wave of deadly violence across the country, with hundreds killed or wounded in poll-related attacks.

It is not the first time religious scholars have been targeted by militants in the Islamic country.

In June a suicide bomber struck near a gathering of clerics in Kabul, about an hour after the group had proclaimed such attacks a sin.

The latest attack comes as the Taliban intensifies pressure on Afghan security forces, even as the international community ramps up efforts to convince the group to engage in peace talks.

US envoy Zalmay Khalilzad expressed hopes in Kabul on Sunday that a peace deal to end the war could be struck before the Afghan presidential election, scheduled for April.

His comments underscore an apparent increasing sense of urgency in the White House and among American diplomats for a peace deal to be done quickly.