The ailing leader at the centre of the growing dispute between Morocco and Spain is accused of war crimes after leading a five-decade campaign for independence in the Western Sahara.
The row arose when Brahim Ghali, using a false identity, was allowed into Spain in April for medical care to treat Covid-19.
Word of Mr Ghali's appearance in Spain led Morocco to demand the arrest of a man it sees as a separatist.
The anger this week resulted in Morocco allowing thousands of migrants to cross to Spain's small north African enclave of Ceuta.
Morocco made clear its annoyance at Spain's treatment of the leader of the Polisario Front, reigniting tensions from Morocco's annexation of the Western Sahara in the 1970s.
The sparsely populated desert region, with its phosphate reserves and rich fishing grounds, was occupied and ruled by Spain from 1884 to 1976. When Spain left, Morocco took control and encouraged thousands of its citizens to settle in the area.
Even before the annexation, Mr Ghali, now in his 70s, was a prominent figure in the formation of the Polisario Front to push for independence before the end of Spanish rule. Backed by Algeria, the group later started a guerrilla war against Morocco’s claiming of the territory.
The UN brokered a ceasefire in 1991 with Morocco controlling about 80 per cent of Western Sahara. The truce included the promise of a referendum on the territory's status, but it never took place because of disagreements over how it would work.
Mr Ghali, meanwhile, continues in exile to head his government from Algeria in pursuit of the self-proclaimed Sahrawi Arab Democratic Republic, which comprises and controls approximately the eastern fifth of Western Sahara's area.
About 180,000 Sahrawi refugees live in camps in Algeria, many without freedom of movement or access to health care. As such, Mr Ghali’s admission to hospital was perceived to betray privileges acquired by his Polisario leadership.
Ghali accused of crimes against humanity
Tensions increased last year when Mr Ghali ended the group’s commitment to the ceasefire after accusing Morocco of attacking peaceful protesters. Analysts warned of wider turmoil with Islamist groups also seeking to control areas of the Sahel region of Africa.
Mr Ghali is accused by a dissident Polisario Front group, based in Spain, of torture and crimes against humanity. The dissidents said members of the movement kept them in camps in Algeria against their will.
Spanish authorities served papers on Mr Ghali in hospital in Logrono, northern Spain, but he declined to sign them and said he had to refer to the Algerian embassy first, according to documents seen by Reuters. He was ordered to appear before a court in the Spanish capital Madrid on June 1, by which time he is expected to be discharged.
Human rights groups claim Mr Ghali, as well as other Polisario Front leaders, is responsible for genocide, murder, terrorism, torture and disappearances.