The statement was carried by the IS-linked Aamaq news agency.
The blast tore through a crowded mosque in the city of Kunduz during Friday noon prayers, the highlight of the Muslim religious week. It was the latest in a series of IS bombings and shootings that have targeted Afghanistan's new Taliban rulers, as well as religious institutions and minority Shiites since US and NATO troops left in August.
The worshippers targeted in Friday's were Hazaras, who have long suffered from double discrimination as an ethnic minority and as followers of Shiite Islam in a
majority Sunni country.
The Islamic State group and the Taliban, who seized control of the country with the exit of the foreign troops, are strategic rivals. IS militants have targeted Taliban positions and attempted to recruit members from their ranks.
In the past, the Taliban managed to contain the IS threat in tandem with US and Afghan airstrikes. Without these, it remains unclear whether the Taliban can suppress what appears to be a growing IS footprint. The militants, once confined to the east, have penetrated the capital of Kabul and other provinces with new attacks.