A suicide bomber blew himself up inside a crowded Shi'ite Muslim mosque in Afghanistan's capital late Thursday, killing at least six people and wounding many others.

Islamic State, through its global mouthpiece the Amal News Agency, claimed responsibility for the bombing.

Witnesses at Kabul's Al Zahra mosque reported that police guards identified and tried to intercept the bomber, but he opened fire at them and forced his way into the worship place.

Relatives and friends confirmed that a prominent trader and leader of the minority Hazara community, Ramzan Hussainzada, was among the dead.

An Afghan Interior ministry spokesman condemned the blast as a "terrorist attack." It occurred when all mosques around the city were crowded as Muslims observe the holy month of Ramadan.

Kabul's Shi'ite community has been the target of suicide attacks in the past, including an attack on a mosque in November that killed more than 30 people.

A Taliban spokesman denied its involvement, saying the insurgents do not attack mosques. Loyalists of Islamic State have taken credit for some of the recent terrorist attacks in Kabul.

VOA correspondent Ayaz Gul from Pakistan contributed to this story.