You are right from a moral perspective. I also think that is how it works in most US states. But the judge must rule on the law as it is written and in this case it is Spanish law. Or should he just “do the right thing” regardless of the law?
No, he should observe Spanish law. You’re right, and I appreciate your clarification. But couldn’t the matter be litigated in some other venue?