Four foreign nationals and three Afghans were also injured in the attack on Friday when gunmen opened fire, ministry spokesman Abdul Mateen Qani said, Al Jazeera reported.
Four people have been arrested, he said.
The Taliban strongly condemned this crime, expressed its deep feelings to the families of the victims, and assured that all the criminals will be found and punished.
No group immediately claimed responsibility for the late evening attack.
Spain’s Ministry of Foreign Affairs later confirmed that the three individuals killed on Friday were Spanish citizens. At least one Spanish national was also among those injured.
Prime Minister Pedro Sanchez said in a post on social media that he was “overwhelmed by the news of the murder of Spanish tourists in Afghanistan”, offering his condolences to the families and friends of the victims.
Sanchez also said he was following the situation closely and pledged consular support.
SD/PR