The attack in the usually tranquil city of Mazar-i-Sharif occurred just before the start of the Taliban's traditional spring offensive, set to be the first fighting season when Afghan security forces battle insurgents without full NATO support.
Explosions rang out as the assailants lobbed grenades and exchanged gunfire with Afghan security forces, setting ablaze one of the buildings in the compound, according to officials and an AFP reporter at the scene.
"Around noon four assailants dressed in military uniforms breached the main gate of the Appeals Court in Mazar-i-Sharif and started firing gunshots and throwing hand grenades inside the complex," said Abdul Raziq Qaderi, the acting provincial police chief of Balkh province.
"Five security personnel and five civilians were killed and 66 others were wounded," he added.
Also Read
Noor Mohammad Faiz, a senior doctor at the local public hospital, confirmed the toll, adding that some of the wounded were in critical condition.
The insurgents were holed up inside the complex for six hours, surrounded by a large number of Afghan security forces before they were taken down.
The Taliban claimed responsibility for the attack, which underscores Afghanistan's precarious security situation as US-led foreign troops pull back from the frontlines after a 13-year war against the Taliban.
"Our mujahideen have carried out a martyrdom attack... In Mazar-i-Sharif city," Taliban spokesman Zabihullah Mujahid told AFP by telephone.
Militant attacks are relatively rare in Mazar-i-Sharif, a city well-known as a melting pot of diverse cultures and religious influences where liberal attitudes coexist with conservative traditions.
It "reminds us of the risks that police, prosecutors and judges face in going about their daily work pursuing impartial justice and rule of law in Afghanistan," the embassy said in a statement.