ISLAMABAD, Pakistan — At least 73 people were reported killed and up to several hundred wounded Thursday when a suicide bomber struck inside a famous Sufi shrine in southeastern Pakistan while devotees were performing a weekly ritual dance, police and medical officials said.

The Islamic State, a Middle East-based militant group with allied outfits in Pakistan and Afghanistan, asserted responsibility for the blast through an affiliated news site.

The attack in the isolated rural town of Sehwan, in Sindh province, was one of the country’s deadliest bombings in a decade of terrorism, and it came after several successive days of violence that claimed 25 lives in all four provinces of Pakistan and two tribal areas.

On Monday, a suicide bombing in a crowded square in the eastern city of Lahore killed 13 people and injured scores. An affiliate of the Islamic State, Jamaat-ul-Ahrar, said in an email to journalists that it was the start of an operation targeting government agencies and sites. Pakistan formally complained to next-door Afghanistan on Wednesday, charging that the militants were operating from sanctuaries across the border. Late Thursday, army officials announced that the border crossings between Pakistan and Afghanistan would be closed until further notice for security reasons.

It was not possible to confirm, however, whether the Islamic State or a local affiliate had carried out the Thursday attack at the Lal Shahbaz Qalandar shrine. In August, when a bomb killed more than 70 people in the southwestern city of Quetta, both the Islamic State and an allied group claimed to be behind it. The Islamic State is also known as ISIS or ISIL.

Troops were sent to the shrine and the surrounding areas, and Pakistan’s army chief, Gen. Qamar Javed Bajwa, issued a statement appealing to the nation to remain calm. “Your security forces shall not allow hostile powers to succeed,” he said.

“Each drop of the nation’s blood will be avenged, and avenged immediately” he added. “No more restraint for anyone.”

Officials at a local hospital said they had received about 60 bodies and about 250 wounded people, including about 40 in critical condition. The Pakistani navy placed all naval hospitals in Karachi, the provincial capital, on special alert to receive patients. Sehwan has very limited rescue and hospital services.

Pakistan has often been accused of coddling some violent Islamist groups that serve as its proxies in India and at home, while cracking down on others that oppose the Pakistani state and unleash attacks on domestic targets. Recently, though, officials placed an extremist anti-India cleric under house arrest, calling it a policy decision by both civilian and military leaders.

Islamist militants, including the Pakistani Taliban, have attacked numerous Sufi shrines in recent years, deeming them anti-Islamic. In November, a Sufi shrine in Balochistan province was bombed, killing 45 people. Sufism is a more mystical strain of Islam, and many conservative Muslims view it as heretical. Sufi shrines welcome people from all walks of life, and offer free food and other charity to the poor. On Thursdays, the shrines host poetry readings and other gatherings.

On Thursday night, officials said that security had been increased at Sufi shrines across the country and that some had been temporarily closed, Pakistani news channels reported.

In addition to targeting Sufis, violent Sunni groups have often attacked Christians, Shiites and Ahmadis, a community that sees itself as a branch of Islam but is reviled by many Muslims. Political leaders in Punjab province have been accused of appeasing some sectarian groups there.

In Sindh, some political leaders have resisted pressure from security agencies and provincial officials to ban or place more controls on extremist Islamic groups and dozens of seminaries alleged to have ties with terrorist groups. Over the past decade, bombings across the province have targeted shrines, mosques and other sites.

While groups affiliated with the Islamic State, including Jamaat-ul-Ahrar, have become more active in Pakistan, they remain controversial among many local Islamist factions. Some such groups have seen their followers defect to the foreign-affiliated outfits, and others have distanced themselves from admirers linked to the Islamic State.

When Jamaat-ul-Ahrar claimed the recent Lahore bombing, it named its planned terror operation after the late leader of Islamabad’s famed Red Mosque, the scene of a dramatic army siege in 2007. But this week, leaders of the mosque denounced the ISIS affiliate as an “enemy of Islam” and said its actions were un-Islamic.