More than 50 people have been arrested across Morocco accused of selling answers to exams, police say.
The baccalaureate exams were taken by half a million secondary school students earlier this week.
Police say leaked questions were posted on social media forums, while answers were sent to students on their mobile phones as they sat the exams.
The cheating first came to light when answers to a maths paper were leaked online. The exam will now be re-sat.
Officials say that 57 people have been arrested in 15 towns across the kingdom in the cash-for-answers scandal.
The Medias 24 website reported that two pages of an exam paper were even posted on Facebook the night before the test.