Suicide bombers killed more than 40 people and left scores injured Thursday, setting off multiple explosions at a gathering inside a pro-Iranian cultural center in the Afghan capital. It was the latest attack in a terrorist campaign against the minority ethnic Shiite community that has intensified over the past two years.

The attack, claimed by the Islamic State through its Amaq News Agency, struck the Tabayan center in a Shiite neighborhood, where hundreds of people had come to commemorate the December 1979 anniversary of the invasion of Afghanistan by Soviet troops.

A spokesman for the public health ministry, Waheed Majroh, said blasts left at least 41 people dead and 84 injured. Another government official, speaking on the condition of anonymity, said more than 50 had been killed. The death toll was expected to rise.

American and international officials condemned the attack and reaffirmed their support for the government of Afghan President Ashraf Ghani, which has been struggling to contain rising violence, ethnic tensions and political unrest amid a protracted insurgency.

[Rupture between Afghan president, regional leader could shake fragile government]

"I have little doubt that this attack deliberately targeted civilians," said Toby Lanzer, the acting head of the U.N. assistance mission here. "Today in Kabul we have witnessed another truly despicable crime in a year already marked by unspeakable atrocities."

U.S. Ambassador John R. Bass said the incident "once again demonstrates the depravity of those who seek to undermine peace and stability in Afghanistan. We remain confident the Afghan government and people, supported by their friends and partners, will defeat those behind these terrible acts."

The Taliban issued a statement denying any involvement. The likelihood that the attack was carried out by Islamic State bombers fit an alarming pattern of deadly incidents that have targeted Kabul's Shiite community, including mosques and other facilities, prompting the government to arm and train local Shiite men as mosque guardians.

In October, a suicide bomber struck a mosque in Kabul during a crowded prayer service just after the holy Shiite month of Muharram, killing 39 people and wounding dozens. In August, 31 people were killed in a terrorist attack on a Shiite mosque in Herat, a city close to the Iran border.

The Islamic State, a militant Sunni extremist group, regards Shiites as heretical, and some analysts have said it is attempting to drive a wedge between Afghan's dominant Sunni populace and the minority Shiites. Its claim of responsibility for the Thursday attack could not be independently confirmed.

[Behind the front lines in the fight to ‘annihilate’ ISIS in Afghanistan]

Afghans have also been recruited through Iran to join the war in Iraq and Syria against Islamic State fighters. Last month, Mohammad Mohaqiq, an Afghan Shiite leader, traveled to Iran and publicly praised those who had taken up arms for that cause. More than 1 million Afghan Shiites have lived and worked in Iran as war refugees over the past several decades.

In Thursday's attack, witnesses said they heard two small explosions and then a larger blast, and officials said the attackers stormed the building and set off explosive devices in the basement. A local Shiite leader said one of the bombers was sitting unnoticed among the participants when he detonated his device.

Community members said many of the people inside the center at the time were educated young people and children taking religious classes.

Ghani called the attack a crime against humanity, Islam and "all human values." He added: "The terrorists have killed our people. The terrorists have attacked our mosques, our holy places and now our cultural center."

The attack came just weeks after Ghani said the Islamic State, which emerged in Afghanistan in late 2014, was "on the run" following a recent series of joint offensives with U.S.-led troops.

A spokesman for the U.S. military mission in Afghanistan, Resolute Support, said the "barbaric attack will not deter the unwavering resolve we have in supporting the Afghan National Defense and Security Forces in achieving peace and freedom for the people of Afghanistan."

Constable reported from Islamabad. Brian Murphy in Washington contributed to this report.

Read more:

Afghanistan’s ‘American Idol’ is the voice of a new generation — and Muslim clerics aren’t happy about it

U.S. wants to build ‘tsunami of air power’ in Afghanistan, but impact is years away

Afghan leaders in Helmand criticize U.S. airstrikes on Taliban drug labs

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news