Updated

King Mohamed VI of Morocco on Sunday revoked a pardon granted to a Spanish serial paedophile whose release sparked angry protests in the kingdom, a palace statement said.

The king "has decided to withdraw the pardon previously accorded to Daniel Galvan Vina", said the text of the statement, published by the official MAP news agency.

It said the "exceptional" decision was taken because of the "gravity of the crimes committed and out of respect for the victims' rights".

Although several media reports have said Vina has left the country, the agency said the justice minister would discuss with Madrid "the next step after the pardon's revocation".

The king's announcement came shortly before a large demonstration was due to take place against the pardon, after baton-wielding police dispersed demonstrations on Friday.

Sit-ins planned for Casablanca on Tuesday and Rabat on Wednesday were planned to still go ahead.

Vina, said to be in his 60s, was pardoned by the king and freed last Tuesday from jail in Kenitra, north of the capital. He had been sentenced in September 2011 to 30 years in prison.

Vina, convicted of raping 11 children aged between four and 15, was among 48 Spanish prisoners released in response to a request from Spanish King Juan Carlos, who visited Morocco in mid-July, the justice ministry said.

Earlier, the palace said in a statement carried on MAP that the king had been unaware of the nature of the man's crimes and had ordered a probe into his release.

The investigation should "determine the responsibilities and the failures that led to this regrettable release", the statement said.

"The king was never informed -- in any way or at any time -- of the seriousness of the abject crimes of which the person concerned was convicted," the palace added.

"It is clear that the sovereign would never have consented" to his release, given the "monstrous crimes" he committed, the statement concluded.

The pardon sparked outrage in the north African country, which has seen several high-profile paedophile arrests in recent months.

Protesters slammed the pardon as "an international shame" with one demonstrator saying the state "defends the rape of Moroccan children".

On June 20, police arrested a suspected British paedophile after local residents overheard screams from a six-year-old girl he allegedly abducted.

And in May, a Casablanca court jailed a 60-year-old Frenchman for 12 years after convicting him of paedophilia.