The AFP news agency quoted Zafarullah Khan, the Peshawar police deputy superintendent, as saying: "Eight people died in the suicide blast and more than 20 have been wounded."
Kamal Hyder, Al Jazeera's correspondent in Pakistan, said: "A lone suicide bomber armed with a handgun forced his way into a Shia mosque ... and once inside he detonated his device, according to eye witnesses.
"This comes in the light of the fact there has been terrible sectarian violence going on in another part of the tribal territory - Kurrum agency, where the government was able to broker a peace deal - so it could be reprisals, but its too early to speculate at this time," he said.
The Peshawar blast comes just before Ashura, an important Shia religious event, which has been the target for attacks in the past.
Last year, in the same quarter of the city, a suicide blast killed 11 people during Ashura.