Morocco's King Mohamad VI released 48 Spanish prisoners in the wake of a recent visit by King Juan Carlos of Spain to the country.
But the magnanimous gestured has backfired after it emerged one of the freed prisoners was a Spanish paedophile serving a 30-year sentences for sexually assaulting 11 children.
A lawyer for the families of the victims, said the Spaniard had raped children aged from four to 15 and filmed the act.
But the paedophile was released on Morocco's annual Throne Day, which celebrates Morocco's ruling family.
The man's lawyer, Mohamed Benjeddou, confirmed on the Lakome news site that his client was among the list of prisoners pardoned by the Moroccan King.
Benjeddou expressed his "surprise" that his client had been released but said "the King's decisions are not discussed".
The lawyer said the paedophile had been handed back his passport on Wednesday, only a day after the pardons were announced.
He had now left the country, the lawyer confirmed.
The decision to release the serial paedophile has unleashed a storm of protest with activists calling for a protest in the Moroccan capital of Rabat on Friday.
There were also a wave of social media activity in the north African country.
"The King's pardon is a second rape for the victims," said a woman identifying herself as Meryem El said on Twitter in an Arabic language tweet that has seen numerous retweets .
'Is this Morocco's way to reach the long-sought target of 10 million tourists a year?' asked blogger Nouhad Fathi on her Facebook wall in a message cited by the UK's Daily Mail.
Spain's El Diario newspaper on Friday cited sources from Spain's royal family as saying "nothing can be done".
"This is an internal decision. We aren't going to do anything."
El Diario also cited the Spanish Ministry of Justice saying: "If he hasn't committed a crime in Spain we can't carry out preventative monitoring."
The country's Department of Public Prosecutions, meanwhile, said: "We can't judge him again."