Taliban attacks in western Afghanistan killed 14 soldiers and policemen on Monday as Kabul residents prepared to bury their loved ones slain in a horrific bombing by the Islamic State group that targeted a voter registration center the day before, killing 57.

The near-simultaneous attacks in western Badghis province, where a large number of insurgents attacked army units in the district of Ab Kamari, killing nine soldiers, said Ghulam Sarwar Haidari, the deputy provincial police chief.

At the same time, another group of insurgents struck police in Qadis district, killing five policemen. Sharafuddin Majidi, spokesman for the provincial governor, confirmed the casualty tolls.

Taliban spokesman Zabihullah Mujahid claimed the attacks in Badghis in a statement to the media.

The attacks came on the heels of Sunday’s suicide bombing in Kabul. The staggering casualty toll — 57 dead and 119 wounded — underscored the struggles the government faces to rein in militant assaults even in large and well-protected urban centers.

The Kabul explosion echoed across the city around 10 am, shattering windows miles from the attack site, leaving the pavement covered with bodies and blood stains and destroying nearby vehicles.

The bomber targeted civilians who were registering for national identification cards, Kabul police said. The Islamic State group claimed responsibility for the attack in a statement carried by its Aamaq news agency, saying it had targeted Shiite “apostates”.

Afghan security forces have struggled to prevent a recent surge in attacks both by the local Islamic State affiliate as well as the more firmly established Taliban. The attacks increased after the United States and NATO concluded their combat mission in Afghanistan at the end of 2014.

Both groups regularly carry out attacks, with the Taliban usually targeting the government and security forces and IS targeting the country’s Shiite minority.

In violence elsewhere in Afghanistan on Monday, four policemen were killed and three were wounded in a Taliban attack in western Farah province, in Bala Buluk district, according to Mohammad Naser Mehri, spokesman for the provincial governor.

Three Taliban fighters were killed and two others were wounded in the gunbattle there that lasted two hours, Mehri said.

In eastern Nangarhar province’s Chaparhar district, militants killed three university students on Monday, said Attaullah Khogyani, the governor’s spokesman. The three were brothers, he added.

No one immediately claimed responsibility for the killing, but Khogyani blamed the Islamic State group, which has been active in Chaparhar and repeatedly claimed attacks in the district.

The latest violence comes as US and the Afghan troops have been conducting counter-terrorism operations and airstrikes across Afghanistan, including in Nangarhar, to root out IS and prevent the group from expanding its footprint in the country.