According to FIFA rules, Spain won the match. The result wasn't decided by the 22 men kicking a football around the pitch, but by an arbitrary decision by the referee to award a penalty to Russia for a handball. The rules says "A handball occurs if any player, other than the team's goalkeeper within his own penalty area, deliberately handles the ball when in play. ". If an opposing player kicks the ball into your arm, you cannot be said to have acted deliberately. According to the BBC pundits, he "deserved" a handball. The rules don't say anything about deserving.
If Association Football is to have any future as a rule based sport, referees and pundits need to be educated on the rules and penalised when they misinterpret them. Otherwise, we might as well do away with the players and have results invented by a panel of referees.