KABUL, Afghanistan — At least 27 worshippers were killed Monday after a suicide bomber blew himself up inside a packed mosque in the Afghan capital Kabul, officials said.

Some 35 people were also injured after the attacker detonated his vest at the Baqir-ul Ulom mosque in the west of the city, local police told NBC News.

The attack took place on the first floor of the two-story building where Shiite worshipers had gathered to commemorate the death of Imam Hussein, the Prophet Muhammad's grandson and an iconic Shiite martyr, in Karbala, Iraq in 680 A.D, according to a Associated Press report from the scene.

Related: Bomber Kills 4 Americans at NATO Base in Afghanistan

"I was inside the mosque and the Mullah was reading the prayer, suddenly a huge explosion happened then everywhere was dark," 50-year-old Ewaz Ali told the AP after suffering minor injuries.

An injured boy is transported to the hospital after Monday's blast. MOHAMMAD ISMAIL / Reuters

Local media reported that the Taliban denied responsibility for the attack but NBC News was unable to immediately confirm the denial.

Shiites are in the minority in Kabul and the attack was the third major attack on them since July, according to Reuters.