A comedian and an online influencer have been jailed after filming a viral video that "insulted Moroccans".
In it, they are seen posing with local children at a Marrakesh restaurant and apparently swearing at them.
French national Brahim Bouhlel, and the French-Moroccan personality known as Zbarbooking, were tried for "filming people without their consent" and the "corruption of minors".
They will now spend eight months and a year in jail respectively.
"This judgement is very harsh! This was all over a bad joke," said Bouhlel's lawyer Marouane Rghioui, who vowed to appeal against the Marrakesh court's verdict.
A third man – French actor Hedi Bouchenafa – is seen in the video with them at the restaurant that day but he reportedly left the country before investigations began.
The video prompted a backlash when it was shared to social media.
The men are heard using insulting language about Moroccan women and Zbarbooking is seen talking to local children in an upbeat tone while swearing at them, pretending to be their errant father.
All three men later apologised, with Bouhlel calling the video a "parody" and saying he felt "completely crushed" when he realised the damage he had done.
Zbarbooking said that as "a Moroccan myself I love my people and the country's traditions", while Bouchenafa apologised to people who had been offended by them "making a joke about giving money to the kids… I was welcomed like a king in Morocco".