At least 12 people have been killed and 70 others injured in an attack in northern Afghanistan.

Gunmen stormed a government compound on Thursday in the town of Mazar-i-Sharif, the provincial capital of Balkh province, killing the police chief and two other officers.
 
Officials say the Taliban is behind the attack.

The assault started with four attackers making their way into the compound housing the regional chief prosecutor's office in the morning hours, according to the Associated Press news agency, citing acting police chief Abdul Raziq Qaderi.

The attackers, wearing military uniforms and explosive vests, threw a hand grenade to blow up the compound entrance, Qaderi said.

Police quickly called in reinforcements, who besieged the compound and started exchanging gunfire with the attackers, said Sher Jan Durani, spokesman for the provincial police chief.

Dozens of people were left wounded, with reports of blood shortages in hospitals emerging and urgent appeals for donors circulating on social media. 

Durani said most of the employees and prosecutors were rescued by police but that some were wounded in the shoot-out.

Qaderi said the dead included four prosecutors and five police. He said all four gunmen were killed. Qaderi had initially said five fighters were involved in the attack.

The city is one of Afghanistan's most economically developed, and attacks by fighters there are rare.

In a separate incident, 12 civilians were wounded by a roadside bomb in eastern Afghanistan, according to an Interior Ministry statement.

Source: Al Jazeera and agencies