Last year’s instalment — the festival’s 13th — drew 2.6 million people in Rabat and organisers said this year’s edition saw 160,000 music fans turn out just to watch Lopez on opening night on Saturday.
But local media criticised the pop star for her “suggestive poses” and for being “scantily” dressed during a show that was broadcast on public television, albeit with a slight delay.
Government spokesman Mustapha Khalfi, a member of the Islamist Justice and Development party, strongly denounced the broadcast on state television.
“What was broadcast is unacceptable and goes against broadcasting law,” Khalfi wrote on Twitter.
The performance of Williams, now world famous for his 2014 smash hit “Happy”, received more universal approval.
“I loved it, there were lots of young people and Pharrell Williams’ performance was full of joy. I want to go back!” one fan told AFP.
On Sunday, Nigerian R&B duo P-Square delighted tens of thousands of onlookers, with one young fan who came with a group of friends saying, “It was great! We love you, P-Square, thank you!”
The festival runs until June 6 and will also see live performances by international acts such as Sean Paul, Avicii, Placebo, Akon, Sting, Usher and Maroon 5. -AFP