The number of civilians killed in Afghanistan reached a record in the first half of the year, despite last month’s ceasefire, with a surge in suicide attacks claimed by Islamic State, the United Nations has said.

The UN report came as an apparent suicide attack close to a government ministry in the Afghan capital Kabul on Sunday killed at least seven people and wounded more than 15 as staff were leaving the office in the evening rush hour, officials said.

The attack was the latest in a seemingly unending series of blasts against civilian targets in Kabul and other major cities.

According to the UN, deaths rose 1% to 1,692, although injuries dropped 5% to 3,430, the UN assistance mission in Afghanistan said on Sunday in its latest civilian casualty report. Overall civilian casualties were down 3%.

Hopes that peace may one day be agreed in Afghanistan were raised last month by a three-day truce over the Eid al-Fitr holiday, which led to unprecedented scenes of Taliban fighters mingling with security forces in Kabul and other cities.

“The brief ceasefire demonstrated that the fighting can be stopped and that Afghan civilians no longer need to bear the brunt of the war,” said Tadamichi Yamamoto, the senior UN official in Afghanistan.

But with heavy fighting across the country during the first half of the year and repeated suicide attacks in Kabul and major provincial cities such as Jalalabad, the report underlined the country’s dire security situation.

It also pointed to increased activity by Isis, reflected in a doubling of casualties in Nangarhar, the eastern province whose capital is Jalalabad, where the militant group has conducted a series of attacks over recent months.

The main causes of casualties were ground engagements between security forces and militants, roadside bombs, as well as suicide and other “complex attacks”, which caused 22% more casualties than in the same period last year.

Hundreds of civilians died in attacks on targets as diverse as Shia shrines, offices of government ministries and aid groups, sports events and voter registration stations.

Isis, also known as Daesh, was said to be responsible for 52% of casualties from suicide and complex attacks, while 40% were attributed to the Taliban.

With parliamentary elections scheduled for October, there is concern about more violence as polling day approaches.

The Taliban, fighting to restore their version of strict Islamic law, have rejected President Ashraf Ghani’s offer of peace talks, demanding that foreign forces leave Afghanistan.

Sunday’s report said the biggest cause of civilian casualties continued to be ground engagements between government forces and militant groups, with 360 deaths and 1,134 wounded. But it noted that these casualties had nonetheless declined by 18%.

At the same time, casualties from airstrikes, which have risen sharply under the US strategy of trying to force the Taliban to accept peace talks, rise by 52%, with 353 casualties including 149 dead and 204 wounded.