A suspected suicide attacker detonated a bomb at a Shia mosque in the northwestern Pakistan city of Peshawar late Thursday, killing at least three people and injuring 20, police said.

shia-mosque-getty-79064570

Shia Muslim men inspect damage at a mosque in Peshawar after a suicide attack on Thursday that killed at least three people and wounded 20, officials said. ((Tariq Mahmood/AFP/Getty Images))

The blast comes as minority Shia Muslims prepare to mark the Ashoura festival, which in previous years has been marred by sectarian violence involving rival Sunnis.

Dawn TV cited witnesses saying six people were killed. It reported the Imambargah Qasim Baig mosque was crowded with worshippers at the time of the attack.

Police official Abdullah Khan said the bomb went off as police stopped to search a man before entering the mosque.

"It was apparently a suicide attack," Khan said.

A senior Interior Ministry official confirmed it was reported to be a suicide attack.

A police officer in Peshawar said three people had been injured and 20 wounded.

The police officer and the Interior Ministry official spoke on condition of anonymity because they were not authorized to release the information.