Two policemen were among the fatalities of the Wednesday blast, Afghan Interior Ministry spokesman, Najib Danish, confirmed, adding that two more policemen also wounded in the explosion.
"The incident occurred near the Pakistani consulate, but we are not sure if it was the intended target," he said.
Earlier, Attaullah Khogyani, a spokesman for the provincial governor, said a bomber had detonated his explosives after being prevented from entering the building.
Afghan security forces were, meanwhile, reported to be trading fire with gunmen barricaded in a house near the consulate after the explosion.
The incidents come as the two countries are partaking in four-way talks, also involving the United States and China, in the Pakistani capital of Islamabad to revive stalled peace talks with the Taliban.