KABUL: A suicide attacker blew himself up in front of a government ministry in Kabul on Sunday as workers were leaving their offices, killing at least seven people and wounding more than 15, officials said, in the latest deadly violence in Afghanistan.

There was no immediate claim of responsibility for the explosion that police spokesman Hashmat Stanikzai said happened at the rural rehabilitation and development ministry around 4:30 pm. Civilians and security forces were among the seven dead, Stanikzai said.

The death toll was confirmed by an Afghan security source. Ministry spokesman Fraidoon Azhand said the bomber struck at a security gate as employees were exiting the compound during rush hour.

But it was not clear if the ministry was the target of the attack. Stanikzai said security forces and a vehicle belonging to foreign advisers to the ministry were in the vicinity at the time of the attack.

There were no foreign casualties, he added. It is the second time in just over a month that the ministry has been caught up in a suicide attack.

On June 11 a bomber blew himself up as ministry workers queued for an early bus home during the holy month of Ramadan, killing at least 13 people and wounding 31.

The Islamic State group claimed responsibility for that attack. Sunday’s blast came hours after a UN report was released showing a record number of civilians killed in the first six months of 2018, with militant attacks and suicide bombs the leading causes of death.

The toll of 1,692 fatalities was one percent more than a year earlier and the highest for the period since the United Nations Assistance Mission in Afghanistan (UNAMA) began keeping records in 2009.

Another 3,430 people were wounded in the war, down five per cent from the same period last year, the report said.

The record high death toll came despite an unprecedented ceasefire by Afghan security forces and the Taliban last month that was largely respected by both sides, UNAMA said.

The ceasefire for the first three days of Eid was marked by scenes of jubilation as security forces and Taliban fighters celebrated the Islamic holiday, raising hopes that peace was possible after nearly 17 years of conflict.

But the suspension of hostilities was marred by two suicide attacks in the eastern province of Nangarhar that killed dozens of people and were claimed by IS, which was not part of the ceasefire.

Suicide bombs and “complex” attacks that involve several militants accounted for 1,413 casualties — 427 deaths and 986 injuries up 22 percent from a year earlier.

UNAMA attributed 52 per cent of those casualties to IS, mainly in Kabul and Nangarhar where the group established a stronghold after emerging in Afghanistan in 2014.

The Taliban was responsible for 40 per cent. While the Taliban is Afghanistan’s largest militant group and holds or contests more territory than any other, IS has repeatedly demonstrated its ability to carry out devastating attacks in urban areas.