ISLAMABAD - Faction of the Pakistani Taliban on Saturday claimed responsibility for an apparent suicide attack on a Shia mosque in Rawalpindi, which killed seven people and wounded 17 others.

The powerful explosion on Friday night in the city triggered chaos as dozens of Shias gathered in the mosque to distribute alms to mark the birthday of the Prophet Muhammad (PBUH).

"We claim responsibility of the attack on the imambargah and vow to continue such attacks against enemies of Islam," spokesman of Jamat-ul-Ahrar faction of Tehreek-e-Taliban Pakistan (TTP), Ehsanullah Ehsan, said in an email. "We want to make it clear to these infidel rulers that we will not be impressed by any of their laws or hangings," he added.

The government has strengthened its own offensive against the Taliban since their attack on a military-run school on December 16 that killed 150 people, 134 of them children.  The country ended its six-year-old moratorium on the death penalty in terror cases last month in the wake of the massacre.

Nine convicted militants have been hanged so far since the de facto ban on capital punishment ended.

To further boost its efforts, the military on Friday announced it was setting up nine military courts to hear terrorism-related cases.