The Taliban have denied involvement in a suicide bombing in the Afghan capital that killed scores of people.

The attack on Tuesday, which targeted a gathering of hundreds of clerics at a wedding hall in Kabul, bore the hallmarks of a local Islamic State affiliate, which has carried out mass bombings targeting minority Shiites as well as perceived supporters of the US-backed government.

Public Health Ministry spokesman Wahid Majroh said 55 people were killed and 94 others were wounded in the attack.

Afghanistan bombing
Debris at the scene of the attack in Kabul (Rahmat Gul/AP)

Both the Taliban and the IS affiliate want to overthrow the Afghan government and impose a harsh form of Islamic rule. But they are bitterly divided over leadership, ideology and tactics.

The Taliban mainly target security forces and government officials, while IS specialises in sectarian attacks on civilians.

Taliban spokesman Zabihullah Mujahid said his group condemns any attack on civilians or religious clerics.

The suicide bomber was able to sneak into a wedding hall where hundreds of Muslim religious scholars and clerics had gathered to mark the birthday of the Prophet Mohammed.

Afghanistan
Inside the wedding hall where dozens of people were killed (Rahmat Gul/AP)

The Islamic State group claimed a suicide bombing in June that killed at least seven people and wounded 20 at a meeting of top clerics in the capital. The body of religious leaders, known as the Afghan Ulema Council, had issued a decree against suicide attacks and called for peace talks. IS said it had targeted “tyrant clerics” who were siding with the US-backed government.

The Taliban denied involvement in the June attack but they also denounced the gathering.

Afghan security forces have struggled to combat the twin insurgencies since the US and Nato formally ended their combat mission in 2014, shifting to a support and counter-terrorism role.

US President Donald Trump’s decision last year to send in additional US forces has had little if any impact on the ground.