People gather at the site of an attack in Kabul, Afghanistan. At least 40 people including two assailants were killed and many others injured after a double suicide bombing rocked a building in western neighborhood of Afghan capital Kabul Thursday, sources and witnesses said. Picture: Xinhua/Rahmat Alizadah

Kabul - Islamic State claimed responsibility for a suicide attack on a Shi'a cultural centre and news agency on Thursday in the Afghan capital that killed dozens of people attending a conference.

Ismail Kawosi, a spokesperson for the ministry of public health, said 41 people had been killed and 48 wounded in the latest in a series of attacks on media organisations in Kabul.

The attack, which involved at least three explosions, occurred during a morning panel discussion on the anniversary of the Soviet invasion of Sunni-majority Afghanistan at the Tabian Social and Cultural Centre, with many of those attending students, witnesses said.

It was also the latest in a series of attacks on Shi'a targets by Islamic State, which claimed responsibility in an online statement.

The floors of the centre, at the basement level, were covered in blood as wailing survivors and relatives picked through the debris, while windows of the news agency, on the second floor, were all shattered.

People running outside into the compound following an initial blast inside were caught by two further explosions which caused heavy casualties, witnesses said.

Read more: Dozens killed in blast at Afghan news agency

Photographs sent by witnesses showed serious damage at the building, in a heavily Shi'a area in the west of the capital, and a number of dead and wounded on the ground.

Deputy Health Minister Feda Mohammad Paikan said 35 bodies had been brought into the nearby Istiqlal hospital. Television pictures showed many of the injured suffered serious burns.

President Ashraf Ghani's spokesman issued a statement calling the attack an "unpardonable" crime against humanity and pledging to destroy terrorist groups.

Taliban spokesperson Zabihullah Mujahid issued a statement on Twitter denying involvement.

The bloodshed follows an attack on a private television station in Kabul last month, which was also claimed by Islamic State.

Backed by the heaviest US air strikes since the height of the international combat mission in Afghanistan, Afghan forces have forced the Taliban back in many areas and prevented any major urban centre from falling into the hands of insurgents.

But high-profile attacks in the big cities have continued as militants have looked for other ways to make an impact and undermine confidence in security. Islamic State, which is opposed to both the Taliban and the Western-backed government, has claimed a growing share of such attacks.

"This gruesome attack underscores the dangers faced by Afghan civilians," rights group Amnesty International said in a statement from its South Asia Director, Biraj Patnaik. "In one of the deadliest years on record, journalists and other civilians continue to be ruthlessly targeted by armed groups."

According to a report this month by media freedom group Reporters without Borders, Afghanistan is among the world's most dangerous countries for media workers with two journalists and five media assistants killed doing their jobs in 2017, before Thursday's attack.

According to Sayed Abbas Hussaini, a journalist at Afghan Voice, one reporter at the agency was killed in Thursday's attack and two were wounded.