KABUL -- Taliban fighters, carrying assault rifles and wearing suicide vests, stormed the Justice Ministry and another government building in Afghanistan's capital Wednesday, forcing workers to flee from windows, according to government officials and a Taliban spokesman.
Nineteen people were killed in the assault.
The coordinated attacks struck in the heart of Kabul, underscoring the reach of the Taliban beyond their strongholds in the south and east ahead of a planned visit by President Barack Obama's special envoy to the region.
Eight assailants also died in the attacks, said Defense Ministry spokesman Gen. Mohammad Zahir Azimi, bringing to 27 the total deaths.
Azimi said all eight attackers had suicide vests, but only three assailants set them off.
Five men armed with assault rifles and grenades attacked the Justice Ministry in late morning - and they appeared to control it for at least a short period.
But by midday, about two hours after the attacks began, Afghan security forces waved from windows in an apparent all-clear sign, according to an AP reporter on the scene. All five attackers were killed in a shootout with security forces.
"They used grenades and AK-47s," Danesh said of the attackers, speaking by mobile phone.
A ministry worker said he scrambled out of a second-floor window to escape an advancing gunman.
Another two men blew themselves up at the ministry's correction department in northern Kabul, Azimi said.
Afghanistan's Health Minister, Mohammad Amin Fatimie, said at least 19 people were killed between the two attacks.
In a third incident near the Education Ministry, police shot dead another attacker, said police officer Zulmay Khan. No one else was reported to have been killed at that scene and it was unclear if he was targeting the Education Ministry, which is very close to the Justice Ministry.
Zabiullah Mujaheed, a spokesman for the Taliban, said the attacks were in response to the alleged mistreatment of Taliban prisoners in Afghan government jails.
"We have warned the Afghan government to stop torturing our prisoners," Mujaheed told the AP in a phone call from an undisclosed location. "Today we attacked Justice Ministry compounds."
The Taliban regularly use suicide bombings in their assaults on Afghan and foreign troops, but the heavily barricaded capital had been largely spared of major attacks recently.