Morocco is seeking the extradition of Daniel Galvan, an Iraqi-born Spanish national who was found guilty in 2011 of raping 11 children aged between four and 15 in Morocco and sentenced to 30 years in prison there.
A public prosecutor told the court Thursday that Spanish law did not allow for Spanish nationals to be extradited to Morocco, a court source said.
The 63-year-old was among 48 Spanish prisoners pardoned by King Mohammed VI and freed from jail following a visit in mid-July to Morocco by Spain's King Juan Carlos.
Mohammed revoked the pardon in August after violent protests erupted across Morocco over Galvan's release.
Moroccan officials said his release was a mistake, and that Mohammed had been unaware of the nature of his crimes.
Police detained Galvan on August 7 at a hotel in the southeastern Spanish city of Murcia where he once worked at a university and he is being held in jail while Spain's High Court considers Morocco's extradition request.
Galvan was born in Iraq but acquired Spanish citizenship after he married a Spanish woman whom he has since divorced.
Spanish Prime Minister Mariano Rajoy's government has approved a proposal to allow Galvan to serve his sentence in Spain if the court allows it.
Galvan also appeared in court for questioning on August 31st accused of sexually abusing a young girl in the eastern Spanish town of Torrevieja in 2004.
The girl's parents brought charges after recognizing Galvan when he appeared on television after the uproar erupted in Morocco over his case.
Galvan told the court he was innocent of those charges.