Gunmen killed at least 32 people and injured almost 60 others at a remembrance ceremony attended by several high-profile politicians in Kabul on Friday, according to a health ministry official.

The ceremony was a commemoration of Abdul Ali Mazari — the leader of Afghanistan's ethnic Hazaras, who are mostly Shiite.

Afghanistan's opposition leader and chief executive, Abdullah Abdullah, was at the ceremony but escaped unharmed.

The self-styled "Islamic State" claimed responsibility for the attack on IS's Amaq news agency. The Islamic extremist group targeted the same ceremony last year, when mortar fire killed at least 11 people.

Security forces killed the two attackers after a standoff

Security forces later killed the two attackers after a standoff, said Interior Ministry spokesman Nasrat Rahimi.

President Ashraf Ghani condemned the attack, calling it a "crime against humanity."

Germany's government also spoke out against the attack, saying "Germany stands on the side of Afghanistan in the fight against terrorism."

Attack raises questions about security in Afghanistan

The attack came a week after the Taliban signed a peace deal with the US that laid out the path for a US military withdrawal from the country.

Kabul-based journalist Ali Latifi told DW that the attack raised huge questions about government's claims that they have the security situation in the country under control.

"It's been three years that this event has [repeatedly] come under attack — people are asking how the security and intelligence forces aren't able to foresee these attacks and take proper precautions ahead of time."

"The prominent politicians were escorted out fairly quickly, and again it's the civilians that are paying the price, who are being killed and injured."

US President Donald Trump on Friday said the Taliban could "possibly" overrun the Afghan government after the US withdraws from the country.

Asked by a reporter at the White House if the Taliban could eventually seize power, Trump said "it's not supposed to happen that way but it possibly will."

Security forces cordoned off roads near to where the attack took place

kmm/msh (AP, AFP, Reuters, dpa)

DW sends out a daily selection of hard news and quality feature journalism. Sign up here.