A suicide bomber killed at least 18 people in an attack targeting the funeral of former district chief in eastern Afghanistan's Nangarhar province.
Afghan forces have had frequent clashes with Islamic State militants in the area in recent weeks.
There was no immediate claim of responsibility. The Taliban denied any involvement.
The incident comes just days after a suicide attack on a Shi'ite cultural center in Kabul that left at least 41 people dead and more than 80 wounded.
Islamic State claimed responsibility for that attack.
Previous attacks on Shi'ite worship places and processions in Kabul and elsewhere in Afghanistan were also claimed by IS.