Russia's foreign ministry said on Wednesday that it had expelled 27 Spanish diplomats in response to Spain earlier expelling Russian diplomats.