A file photo shows Spain s Foreign Minister Jose Manuel Albares speaking in Islamabad, Pakistan. (AP)
"The Russian authorities justify this decision on grounds of reciprocity for the expulsion of 27 Russian embassy officials in April. But that expulsion was based on justified security reasons, which are not present in this case," a foreign ministry statement said.
The Spanish decision was taken in early April just days after dozens of bodies in civilian clothing were found on the streets of Bucha just outside Kyiv following the withdrawal of Russian troops, raising allegations of Russian war crimes.
At the time, the foreign ministry said it would expel the Russian diplomats on grounds they were "a threat to (Spain's) interests and security".
The Russian ambassador was not among those asked to leave.
The decision was part of a coordinated move across Europe that saw more than 200 Russian envoys sent home in 48 hours on grounds of alleged spying or "national security reasons" as outrage grew over the atrocities in Ukraine.
The Kremlin denounced the expulsions as "short-sighted" and said it would lead to "retaliatory steps".