Islamabad, Pakistan - Pakistan has closed two of its border crossings with Afghanistan and demanded that Kabul takes action against 76 "terrorists" it says are hiding in Afghan territory in response to the worst attack on Pakistani soil since 2014.

At least 88 people were killed and hundreds more wounded when a suicide attacker targeted a gathering of worshippers at a shrine in the southern town of Sehwan on Thursday.

The Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group claimed responsibility for the blast.

The shrine, built in 1356, is by the tomb of Syed Muhammad Usman Marwandi, the Sufi philosopher poet better known as Lal Shahbaz Qalandar, one of Pakistan's most venerated saints.

On Friday, Pakistan’s military said Afghanistan must take "immediate action" against the 76 people identified to them.

Pakistan-Afghanistan Border closed with immediate effects till further orders due to security reasons. — Maj Gen Asif Ghafoor (@OfficialDGISPR) February 16, 2017

Afg Embassy officials called in GHQ. Given list of 76 Ts hiding in Afg. Asked to take immediate action / be handed over to Pakistan. — Maj Gen Asif Ghafoor (@OfficialDGISPR) February 17, 2017

Security officials told Al Jazeera that at least 39 suspected fighters had been killed in security raids carried out overnight in response to the attack.

Thursday's attack came after one of the bloodiest weeks in recent memory in Pakistan, with at least 99 people killed in a series of attacks since Monday, most claimed by the Pakistani Taliban or one of its factions.

On Monday, 13 people were killed in a suicide bombing at a rally in the eastern city of Lahore.

That attack was followed on Wednesday by a suicide bombing at a government office in the Mohmand tribal area and a suicide attack on government employees in Peshawar, killing six people.

Two police officers were killed on Tuesday while trying to defuse a bomb in the Balochistan provincial capital of Quetta.

Border closure

Al Jazeera's Kamal Hyder said the second major border crossing at Chaman, which leads to Kandahar in Afghanistan from the Pakistani city of Quetta, was closed on Friday after the Torkham border was sealed off late on Thursday.

In Sehwan, meanwhile, police cordoned off the shrine early on Friday as forensic investigators arrived.

The floor of the shrine was still stained with blood on Friday morning as dozens of protesters pushed past police pickets demanding to be allowed to continue to worship there.

At least 20 children are believed to be among the dead, the head of Sehwan's medical facility, Moeen Uddin Siddiqui, said.

At 3.30am, the shrine's caretaker stood among the carnage and defiantly rang its bell, a daily ritual that he pledged to continue.

The Sindh provincial government announced three days of mourning as Pakistanis vented their grief and fury on social media, bemoaning the lack of medical facilities to help the wounded, with the nearest hospital around 70km from the shrine.

All shrines in the province have been closed, a decision that prompted furious reaction from protesters in Sehwan.

"Give us the charge of the mazaar [shrine], we will take care of it rather than the police," a shopkeeper said.

"Keeping it closed is unfair to the people of Sehwan. We can take care of our own place. We can do everything to protect it."

'Afghan role'

Pakistan's military has long blamed the Afghan government for allowing sanctuary on its soil to fighters targeting Pakistan since a 2014 Pakistani military operation to drive out armed groups from the country’s restive tribal areas.

"Recent Ts acts are being exec on directions from hostile powers and from sanctuaries in Afghanistan. We shall defend and respond," Asif Ghafoor, Pakistan's military spokesman, said on Twitter.

Afghanistan denies the charge, accusing Pakistan in turn of allowing leaders of the Afghan Taliban and the Haqqani Network armed groups to roam freely on Pakistani soil.

Pakistan denies this, but several high-profile Afghan Taliban leaders have been killed or captured on its soil, including former chief Mullah Akhtar Mansour in a US drone strike last year.

Pakistani Taliban leaders have similarly been captured or killed on Afghan soil.

Following the attack in Lahore, the Pakistani Foreign Office summoned senior Afghan embassy official Syed Abdul Nasir Yousafi.

"Afghanistan was urged to take urgent measures to eliminate the terrorists and their sanctuaries, financiers and handlers operating from its territory," according to a Foreign Office statement.

Analysts, however, warn that amid this "war of sanctuaries" between Pakistan and Afghanistan, armed groups are being left to their own devices.

Since the launch in 2014 of a military operation in the tribal area of North Waziristan - then-headquarters of the Pakistani Taliban and its allies - the Pakistani military says it has killed more than 3,500 fighters and destroyed Taliban infrastructure.

At least 583 soldiers have also been killed.

Since then, violence had decreased markedly, but sporadic high-casualty attacks continued to occur, notably a hospital bombing killing 74 in Quetta and an Easter Day park bombing that killed more than 70 last year.

Thursday's attack was the deadliest in Pakistan since December 2014, when fighters assaulted a school in Peshawar, killing 154 people, mostly schoolchildren.

With additional reporting from Wali Muhammed in Sehwan