Morocco on Saturday summoned the Spanish ambassador to Rabat to lodge its disappointment after Madrid allowed the leader of the Polisario Front to seek treatment following a Coronavirus infection.
Brahim Ghali is said to have entered Spain through Algeria using a false identity.
A Spanish foreign ministry official told journalists that Ghali had only been welcomed into the country on humanitarian grounds.
Ghali was elected on July 9, 2016, to lead the Polisario, which campaigns for independence of Western Sahara. But Morocco claims sovereignty over the territory.
Morocco's claims were bolstered by the US which recognized the kingdom's authority over Western Sahara, following a deal to 'normalize' ties with Israel in December.
Spain has tried Ghali in absentia for murder since 2006. It is not clear if he faces arrest after his hospitalization.
Classified as a "non-self-governing territory" by the United Nations in the absence of a final settlement, Morocco has been at odds with the Algerian-backed Polisario Front for nearly half a century.