At least 20 people were killed in an hours-long suicide bomb and gun attack on a Shia mosque in the Afghan capital of Kabul on Friday, an official said.
"We have 20 killed and more than 50 wounded," Mohammad Ismail Kawoosi, a health ministry official, told AFP.
A police officer, a special forces member, a cleric and a security guard are among the casualties, an interior ministry official said.
The militant Islamic State (IS) group claimed responsibility for the attack through the group's affiliated news agency Amaq.
Officials said gunmen stormed the mosque while worshippers were at Friday prayers, setting off an explosion and pushing into the shrine.
After the suicide bomber detonated himself inside the mosque and the attack was underway, police were promptly deployed at the site in a northern Kabul neighbourhood and encircled the mosque, but were not advancing inside to prevent further casualties, police official Mohammed Jamil said.
More explosions and gunfire echoed from the site of the attack.
Mir Hussain Nasiri, a member of Afghanistan's Shia clerical council, confirmed that the cleric who was performing the prayers was killed, but did not give his name.
Nasiri said the gunmen had taken over a portion of the mosque with separate prayer areas for men and women.
There have been several attacks against Shia mosques in Afghanistan in recent weeks.
Last month, 32 people were killed when gunmen stormed a Shia mosque in western Herat province.
The Islamic State group claimed responsibility for that attack and vowed to carry out more attacks against Afghanistan's minorities.
Taliban kill 4 policemen in Kandahar
Taliban attacked a security outpost in southern Kandahar province, the insurgents' former heartland, killing four troops on Friday.
Provincial police chief's spokesman, Zia Durrani, said that the security forces repulsed the Taliban attack with the help of air support from the Afghan air force.
Durrani said that seven policemen were wounded in the Friday morning attack while the Taliban also sustained heavy casualties. There has been no immediate comment from the Taliban.
Separately, provincial deputy police chief Nisar Ahmad Abdul Rahimzai said that Afghan security forces recaptured a district in eastern Paktia province from the insurgents.
The summer fighting season in Afghanistan has been brutal so far this year, with relentless Taliban attacks around the country as the insurgents battle to expand their footprint.