Morocco imposed a lockdown on Casablanca and shut its schools on Monday, the day pupils were due to return to classes, in a bid to stop the spread of Covid-19.
The new measures, which include restrictions on movement and a night-time curfew, would be in place for two weeks in the commercial capital, the authorities said a statement issued late Sunday.
"We risk being overwhelmed by the virus," said Health Minister Khalid Ait Taleb.
"Therefore, drastic measures are required, otherwise the situation may get out of control in the coming days," the official MAP news agency quoted him as saying.
Morocco has seen a spike in coronavirus cases in recent weeks. It recorded 2,234 new infections on Sunday, a record for a single day, with 42 per cent of them in Casablanca, home to 3.3 million people.
Since detecting its first case in early March, Morocco has recorded 72,394 cases of Covid-19 infection, including 1,361 deaths.
The authorities blame the spread of Covid-19 on people's failure to adhere to health protocols.
Casablanca, along with Marrakesh, had already been subject to a series of restrictions three weeks ago, including beach closures and shortened business hours.
Authorities decided on Monday to close educational institutions including primary, middle and high schools as well as universities.
That came after epidemiologists voiced concern over the health system's capacity to respond to the crisis, and the additional risks posed by the start of the school year.
All exits to major cities were closed from midday, with travel only allowed with "exceptional authorisation" issued by local authorities.
'Negative effects'
The decision not to reopen schools drew criticism on social media from Moroccans expressing their disappointment.
"We spent the weekend labelling school supplies with the children, they were on cloud nine over returning to school tomorrow," wrote one father on Twitter. "How do you explain this to a six-year-old and an eight-year-old?"
Another parent was also indignant: "They tell us, without any notice, without delay and late in the evening... that we are being forced into semi-imprisonment," he tweeted.
Ahead of the planned opening, epidemiologists had raised concerns over the health risks of students returning to school and the capacity of the health sector to respond to a further spike in cases.
Dr Tayeb Hamdi, vice president of the national health federation had recommended postponing the start of the school year to "avoid schools becoming vectors of contamination", in an interview published Monday by the news site Medias24.
But the head of the child psychiatry department of the largest hospital in Casablanca, Ghita Benjelloun, also flagged "extremely negative effects" of keeping schools closed after a long lockdown that generated among young people "a lot of fear, anxiety and insecurity".
Cases of suicide attempts, violence and conduct disorders among young patients — both children and adolescents — have tripled in her department since the lockdown, she said, according to Medias24.
In mid-June, the Moroccan Pediatrics Society had alerted authorities to the possible "devastating effect" of lockdown on youths.