Spanish paedophile Daniel Galvan Vina remanded in custody
A Spanish court has remanded in custody a man convicted of raping 11 children who was mistakenly freed from a Moroccan jail last week.
Morocco is seeking the extradition of Daniel Galvan Vina, who will now be detained while his fate is determined.
Galvan had been freed as part of a royal pardon but was detained in the Spanish city of Murcia on Monday.
Moroccan officials said his release was a mistake, and that the king had been unaware of the nature of his crimes.
King Mohamed VI has since sacked the head of prisons and rescinded the pardon.
While Morocco has asked for him to be sent back, correspondents say this will not be straightforward as there is no extradition treaty between the two countries.
Galvan's victims were aged between four and 15. He was sentenced to 30 years in prison in September 2011.
The court heard that he was born in Iraq and acquired Spanish nationality after marrying a Spanish woman whom he has since divorced.
He has lived in several countries, including Egypt, Jordan, Syria, Britain and Morocco.
The judge ruled that he was a flight risk and so should stay in custody.
Galvan, 63, was among 48 Spanish prisoners pardoned by the Moroccan king on Tuesday last week, after a request from Spain's King Juan Carlos. Spain says it asked for him to be transferred to a Spanish jail, not for a pardon.
The release sparked violent protests outside parliament in the Moroccan capital Rabat on Friday.
A number of foreign suspected child-sex offenders have recently been detained in Morocco.
In June, a British man was arrested in the port town of Tetouan over allegations of raping a six-year-old girl.
In May, a Casablanca court sentenced a French man to 12 years in jail on paedophilia charges.
Thousands of Moroccans marched in Casablanca earlier this year to condemn paedophilia and violence against children.