NEW DELHI: A German consulate in the northern Afghan city of Mazar-i-Sharif came under attack late on Thursday, as a Taliban suicide bomber rammed a car packed with explosives into the consulate’s wall, killing at least four civilians and wounding several others.

Heavily armed militants followed up the blast, leading to an intense battle between the fighters and German and Afghan security forces. NATO confirmed that the attack had caused significant damage to the building, where over 30 people worked.

The Taliban was quick to claim responsibility for the attack, linking it in turn to NATO airstrikes on a village in the northern war torn city of Kunduz last week, where 30 people, largely civilians, were killed.

A foreign ministry spokesman in Berlin said the attack was suppressed in the early hours of Friday. “All German employees of the consulate general are safe and uninjured,” he said.

The attacks represent a worsening security situation in Afghanistan and come as the Taliban makes massive gains throughout the country -- especially in the provinces of Helmand and Kunduz. Reports from the ground state that Lashkar Gah is in lockdown with only a few shops open and many families trying to flee the fighting. Schools and universities across the province have been closed indefinitely. Reports from Kunduz tell the same story, with news routinely breaking that the Taliban have pushed into Kunduz city before being repelled by Afghan forces.

Afghan and NATO forces repeatedly insist that neither Lashkar Gah or Kunduz are at risk of falling to the Taliban, but reports from the ground differ as the Taliban closes in on both cities and controls large swathes of the surrounding territory.

The result of the push in fighting is a spike in civilian casualties, with UN Assistance Mission in Afghanistan (UNAMA) documenting 1,601 civilian deaths and 3,565 injured civilians between January and June this year, an increase of four per cent in the total number of casualties compared to the first six months of 2015.

The total civilian casualty figure recorded by the UN since 1 January 2009 through 30 June 2016 has risen to 63,934, including 22,941 deaths and 40,993 injured.

“The testimony of victims and their families brings into agonizing focus the tragedy of each one of the 63,934 people killed or maimed by this protracted conflict since 2009,” said UN High Commissioner for Human Rights Zeid Ra'ad Al Hussein in a press release.

This year's casualties include 1,509 children, 388 dead and 1,121 injured, a figure Zeid described as “alarming and shameful,” particularly as it represents the highest numbers of children killed or wounded in a six-month period since counting began in 2009.

There were also 507 women casualties, 130 killed and 377 injured.

The figures are conservative – almost certainly underestimated – given the strict methodology employed in their documentation and in determining the civilian status of those affected.

In the press release, Tadamichi Yamamoto, the Secretary-General's Special Representative for Afghanistan and head of UNAMA, stressed that the report must serve as a call to action by parties to the conflict “to do all they can to spare civilians from the horrors of war.”

“Every single casualty documented in this report – people killed while praying, working, studying, fetching water, recovering in hospitals – […] represents a failure of commitment and should be a call to action for parties to the conflict to take meaningful, concrete steps to reduce civilians' suffering and increase protection,” Yamamoto said.

“Platitudes not backed by meaningful action ring hollow over time. History and the collective memory of the Afghan people will judge leaders of all parties to this conflict by their actual conduct,” he added.