Thousands of mourners gathered in Pakistan’s capital on Saturday to bury victims of a suicide bombing at a Shi’ite mosque that killed 31 people during Friday prayers, as authorities tightened security amid fears of further attacks.

In Friday's attack a man opened fire at the Khadija ‍Tul Kubra Imambargah compound on the outskirts of Islamabad, then detonated a bomb that killed 31 people, as well as himself, and injured more than 170.

Daesh terrorist group claimed responsibility for the attack, the deadliest ‌of its kind in Islamabad in more than a decade, in a statement on ‍the Telegram messaging app.

While bombings are rare in heavily guarded Islamabad, this is the second such attack in three months and, given a recent rise in militancy, they have triggered fears of a return to violence in Pakistan's major urban centers.

Security was visibly beefed up across the city, with police checkpoints set up on all main roads and streets leading to important sites. Police and elite commandos stood guard as funeral prayers for some of the victims were held in an open area near the Imambargah.