A suicide bomber killed nine people at a political gathering in the Afghan capital on Thursday in an attack claimed by Isis.

Interior Ministry spokesman Najib Danish said the attacker detonated his payload at the entrance to a wedding hall where the event was being held, killing seven police and two civilians, and wounding another nine people.

Isis claimed the attack in a statement carried by its Aamaq news agency. The Taliban denied involvement.

Parliament member Hafiz Mansoor, who attended the meeting but was not harmed, said around 700 supporters of the governor of the northern Balkh province were attending a conference to highlight his work.

Afghan security forces have struggled to combat the Taliban and other insurgents since the U.S. and NATO shifted to a counterterrorism and support role at the end of 2014. The Taliban have seized a number of districts across the country, and both groups have carried out major attacks.

Both the Taliban and the Isis affiliate, which is largely made up of disgruntled former Taliban fighters, are at war with the government. Both groups want to impose a harsh version of Islamic law on Afghanistan, but they are fiercely divided over leadership, tactics and ideology, and have clashed on a number of occasions.