QUETTA, Pakistan — A suicide bomber struck a Shi’ite shrine packed with worshipers in a remote village in southwestern Pakistan on Thursday, killing 20 people and leaving at least 25 wounded, a provincial government spokesman and the police said.
Within hours, the Islamic State group claimed responsibility for the attack.
The bomber detonated his explosives vest when he was stopped for a routine search by a police officer guarding the shrine in the village of Jhal Masgi, about 240 miles east of Quetta, the capital of Baluchistan province.
Anwarul Haq Kakar, spokesman for the provincial government, said the death toll could rise further as some of the wounded remained in critical condition.
Mohammad Iqbal, a district police chief, said five children and a police officer were among the dead.
Atif Ali Shah, the custodian of the shrine, told reporters that had the attacker managed to enter the shrine, there would have been many more casualties.
The police officer who stopped the bomber and other guards who rushed to the scene ‘‘saved many lives,’’ he said.
Hundreds of devotees were present at the shrine for a monthly gathering when the bomber hit.