A Spanish pedophile, who was accidentally pardoned by Morocco's king and travelled to Spain sparking protests in the North African country, has been jailed.
Judge Fernando Andreu jailed Daniel Galvan, 64, preventively while Spain would decide whether or not to extradite him to Morocco.
The judge said he was a flight risk and also cited the seriousness of Galvan's crimes, for which he was sentenced to 30 years in prison in Morocco.
Galvan was detained in the southern city of Murcia on Monday after Morocco issued an international arrest warrant for him.
A Moroccan court found Galvan guilty in 2011 of abusing 11 children aged between 3 and 15 years in Kenitra, near the capital Rabat, in 2005.
King Mohammed VI last week pardoned 1044 prisoners on the occasion of Throne Day, which celebrates the Moroccan monarchy.
Those pardoned included 48 Spaniards.
They accidentally included Galvan, who was not on a list of prisoners Spain wanted Morocco to release.
Spain had only asked for him to be moved to a Spanish prison, according to officials in Madrid.
But Galvan was released after serving less than two years of his sentence - a move that sparked protests in several Moroccan cities.
Dozens of people were reported to have been injured in clashes between demonstrators and police.
Mohammed VI on Sunday cancelled the pardon, saying he would not have granted it had he known about the extent of Galvan's crimes.
But Galvan had meanwhile travelled to Spain, where police found him in a hotel in Murcia.
He was handed over to Madrid's National Court.
Prosecutors questioned him for 45 minutes and asked judge Andreu to jail him.
Spain does not usually extradite its citizens, and it was thought possible that Galvan would serve the rest of his Moroccan prison sentence in Spain.
Moroccan officials were due in Madrid to discuss the case later on Tuesday.
The royal pardon unleashed unusual criticism of the monarchy in Morocco, where Mohammed VI had managed to contain Arab Spring protests by adopting constitutional reform curtailing some of his powers in 2011.
