Morocco said Saturday the Western Saharan independence movement leader had entered Spain with forged documents and demanded an investigation into the incident at the centre of a diplomatic row.
Brahim Ghali, who heads the Algeria-backed Polisario Front, has been treated for Covid-19 in Spain since mid-April, a move that has angered Morocco.
Tensions between the two countries rose further after thousands of migrants crossed the border from Morocco into Spain's North African enclave of Ceuta this week.
Analysts have said Rabat allowed the crossings to pressure Madrid to recognise Moroccan sovereignty over Western Sahara.
Ghali, who is in his 70s, travelled to Spain "with forged documents and a fake identity", Fouad Yazourh, a senior Moroccan foreign ministry official, told reporters.
"An investigation, which we hope will be transparent, should be carried out to shed light on this affair," he added.
In April, Morocco summoned the Spanish ambassador to express its "exasperation" after Ghali was allowed into Spain for medical care and demanded an explanation.
The Spanish foreign ministry said at the time that he had been allowed into the country for "strictly humanitarian reasons".
Earlier this week, judicial sources told AFP that a Spanish court has reopened a probe into allegations of torture against Ghali.
The accusations were filed by the Spain-based Sahrawi Association for the Defence of Human Rights, the sources said.
The group alleges dissident members of the Western Sahara independence movement were held in camps in Algeria where they underwent torture and in some cases were killed.
The Algeria-backed Polisario Front has long fought for Western Sahara's independence from Morocco. A desert region the size of Britain, it was a Spanish colony until 1975.
Morocco has offered Western Sahara autonomy, but maintains the territory is a sovereign part of the kingdom.