An Islamic State affiliate on Friday claimed a series of bombings a day earlier that targeted Afghanistan’s minority Shiite Muslims, while Pakistan issued a warning of IS threats in its eastern Punjab province.

The deadliest of three bombings on Thursday in Afghanistan exploded inside a Shite mosque in northern Mazar-e-Sharif. Hospital officials say at least 12 people were killed and as many as 40 were hurt.

Also read: Why US lawmaker Ilhan Omar’s Pakistan occupied Kashmir visit agitates India

Earlier Thursday, a roadside bomb exploded near a boys school in the Afghan capital of Kabul, injuring two children in the city’s predominately Shiite neighborhood of Dasht-e-Barchi. A third bomb in northern Kunduz injured 11 mechanics working for the country’s Taliban rulers.

Since sweeping to power last August, the Taliban have been battling the upstart Islamic State affiliate known as Islamic State in Khorasan Province or IS-K which is proving to be an intractable security challenge for Afghanistan’s religiously driven government. Last November the Taliban’s intelligence unit carried out sweeping attacks on suspected IS-K hideouts in eastern Nangarhar province.

Also read: 18 Sri Lankan nationals flee crisis-hit island nation, reach Tamil Nadu

In a statement Friday, the IS-K said the explosive devise that devastated Mazar-e-Sharif’s Sai Doken mosque was hidden in a bag left inside among scores of worshippers. As they knelt in prayer, it exploded.

“When the mosque was filled with prayers, the explosives were detonated remotely,” the IS statement said, claiming that 100 people were injured.

Also read: Heavy fighting in Donetsk, Luhansk, as Russia steps up attack on Donbas

The Taliban say they have arrested a former IS-K leader in northern Balkh province, of which Mazar-e-Sharif is the capital. Zabihullah Noorani, information and culture department chief in Balkh province, said Abdul Hamid Sangaryar was arrested in connection with Thursday’s mosque attack.

The IS-K had been relatively inactive in Afghanistan since last November, but in recent days have stepped up its attacks in Afghanistan and in neighboring Pakistan, taking aim at Shiite Muslim communities reviled by Sunni radicals.

Earlier this month two bombs exploded in Kabul’s Shiite neighborhood of Dasht-e-Barchi, killing at least seven students and wounding several others.

The IS-K established its headquarters in eastern Afghanistan in 2014 and have been blamed for some of the worst attacks in Afghanistan, including a vicious assault on a maternity hospital and at a school that killed more than 80 girls in 2021, months before the Taliban took power.

The IS-K also took responsibility for a brutal bombing outside the Kabul International Airport in August 2021 that killed more than 160 Afghans who had been pushing to enter the airport to flee the country. Thirteen U.S. military personnel also were killed as they oversaw America’s final withdrawal and the end of its 20-year war in Afghanistan.

Also read: US to send mysterious Phoenix Ghost suicide drones to Ukraine: What we know

In recent months, the IS-K has also stepped up attacks in neighboring Pakistan, targeting a Shiite mosque in the northwestern city of Peshawar in March. More than 65 worshippers were killed. The upstart affiliate has also claimed several deadly attacks against Pakistan’s military .

In Pakistan’s central Punjab city of Faisalabad, the local police on Thursday issued a threat warning, saying “it has been learned that IS-Khas planned to carry out terrorist activities in Faisalabad,” advising people to “exercise extreme vigilance.” The police warning did not elaborate.

Meanwhile late on Thursday a Pakistani soldier was killed in southwestern Baluchistan province after militants raided a security outpost. No one claimed responsibility. The area has been targeted by both IS-K as well as the violent Pakistani Taliban militants known as Tehreek-e-Taliban Pakistan (TTP) also headquartered in neighboring Afghanistan.

The safe havens of militant groups in Afghanistan has raised concerns for Pakistan which earlier this month carried out air strikes inside Pakistan, killing at least 20 children, according to the United Nations education fund (UNICEF).

Pakistan has not confirmed the strikes but has warned Afghanistan’s Taliban to stop its territory being used to attack across the border into Pakistan.

Associated Press Writer Tameem Akhgar in Islamabad, Asim Tanvir in Multan, Pakistan and Maamoun Youssef in Cairo contributed to this report