The victims were three policemen and two civilians, according to the regional hospital of Herat, in the far west of the country. Herat provincial spokesman Jelany Farhad confirmed that one of the civilians killed was a child.
Four more people were injured in the attack and taken to the hospital.
There was no immediate claim of responsibility.
The Herat police chief said the security forces killed one of the attackers and were looking for two more. The Afghan security forces have seized a vehicle loaded with explosives that have said that the attackers have brought in place
In December, at least 47 people were killed and 25 wounded during a seven-hour assault started with a car bomb in a government building in the Afghan capital of Kabul, authorities said.
One police officer and four assailants were among the dead after the deadlock at the National Authority for Disabled Persons and Martyrs' Families in Kabul, according to Najib Danish, spokesman for the Ministry of Interior .
The official said that planning is under way, and it may take months for nearly 7,000 soldiers.