More than 1,000 people were attending a religious service at the mosque

At least 20 people have been killed after a suicide bomber detonated a device at the entrance to a Shia mosque in north-east Pakistan, police say.

Dozens of others were injured in the blast south of the capital, Islamabad.

A religious congregation attended by upwards of 1,000 people was taking place at the mosque in the Chakwal area of Punjab province.

A day earlier eight paramilitary soldiers were killed in a suicide attack on an Islamabad security base.

Nadim Hasan Asif, a top regional security official, said the bomber "was stopped at the entrance (to the mosque) and pushed himself in and exploded," AP news agency reported.

Another official, provincial law minister Rana Sanaullah told AFP: "The bomber was intercepted at the entrance otherwise he could have caused large-scale casualties."

Eyewitnesses described the bomber as a male teenager dressed in black.

A doctor at a nearby hospital said more than 60 people were injured and that some of them were in a critical condition.

It is not clear who was behind the latest attack but analysts say it appeared to be sectarian in nature.

Pakistan has a long history of tit-for-tat attacks by militants from the majority Sunni and minority Shia communities and thousands of people have been killed, correspondents say.

Last month, a suicide bomber killed 48 people and wounded many others at a mosque near the Afghan border in the worst such attack to strike Pakistan this year.