KABUL, Afghanistan — An Islamic State suicide bomber struck a Shiite cultural center in Kabul on Thursday, killing at least 41 people and underscoring the extremist group’s growing reach in Afghanistan even as its self-styled caliphate in Iraq and Syria has been dismantled.

The attack may have targeted the pro-Iran Afghan Voice news agency housed in the two-story building. The Sunni extremists of Islamic State, also called ISIS, view Shiite Muslims as apostates and have repeatedly attacked Afghanistan’s Shiite minority and targets linked to neighboring Iran.

The attack wounded 84 people, many of whom suffered severe burns.

Local Shiite leader Abdul Hussain Ramazandada said the bomber slipped into an academic seminar at the center and blew himself up among the participants. More bombs went off outside the center as people fled.

The ISIS-linked Aamaq news agency said four bombs were used in the assault, one strapped to the suicide attacker. It said the center was funded by Iran and used to propagate Shiite beliefs.

Ali Reza Ahmadi, a journalist with Afghan Voice, said he leaped from the window of his second-floor office after the first bomb went off and saw flames pouring from the basement.

“I jumped from the roof toward the basement, yelling at people to get water to put out the fire,” he said.

At nearby Istiqlal Hospital, Director Mohammed Sabir Nasib said the emergency room was overwhelmed. Additional doctors and nurses were called in to help. At the height of the crisis, more than 50 medics were working to save the wounded.

The cultural center was housed in a simple building surrounded by mud-brick homes in the Shiite-dominated neighborhood of Dasht-e-Barchi, home to some of Kabul’s poorest residents.

A senior member of the local Shiite clerical council, Mohammad Asif Mesbah, said the center may have been targeted because it houses Afghan Voice. The news agency’s owner, Sayed Eissa Hussaini Mazari, is a strong proponent of Iran, and the agency’s output is dominated by Iranian news.

The center was marking the anniversary of the 1979 Soviet invasion with a seminar about the event’s impact on the country.

Iran, a Shiite-majority country bordering Iraq and Afghanistan, has provided heavy military and financial aid to the Syrian government as well as regional Shiite militias battling ISIS in recent years.

The extremist group is confined to a few remote patches of territory in Syria, but it retains the ability to inspire and carry out attacks further afield. Powerful affiliates in Afghanistan and Egypt’s Sinai Peninsula continue to launch regular assaults against security forces and civilians.

The ISIS affiliate in Afghanistan, which emerged in 2014 at around the same time the group declared a caliphate in large parts of Syria and Iraq, has vowed to target Shiites.

The militants attacked the Iraqi Embassy and two Shiite mosques in Kabul earlier this year, killing dozens of people. A suicide attack on the largest Shiite mosque in the western Herat province last summer killed at least 90 people.

Afghanistan’s ISIS affiliate consists of displaced Uzbek militants and disgruntled former members of the much larger and more entrenched Taliban movement. The Taliban and ISIS share the goal of overthrowing Afghanistan’s Western-backed government and imposing a harsh version of Islamic law, but they are divided over leadership, tactics and ideology, and have clashed on a number of occasions.

The Taliban denied any involvement in Thursday’s attack.

Afghan President Ashraf Ghani called the attack a “crime against humanity.”