Taliban carried out attacks on two government buildings in Afghanistan Wednesday, killing 10 civilians and three officials. The militants targeted the justice ministry in Kabul and a prison near the Khair Khana district, north of the capital. The Taliban claimed they were retaliating against poor treatment of prisoners in Afghan jails, the interior ministry was quoted as saying by CNN. In the attack at the justice ministry, two gunmen burst in and killed three government employees before police overpowered them, Zemarai Bashary of the interior ministry said. Police swarmed in, looking for more assailants. Witnesses who had gathered outside heard intermittent bursts of gunfire from deep within the building. Shortly before 1 p.m. (9 a.m. GMT) Wednesday, police dispatchers said officers found a third gunman holed up in one of the rooms. He was killed in a gun battle. In the second attack, a suicide bomber detonated explosives outside the prison near the Khair Khana district, north of Kabul, the interior ministry said. Ten civilians died in the attack. A fifth militant was shot and killed in front of the education ministry in Kabul, Bashary's office said. Authorities were still looking for three others who were thought to be hiding in the city.