The two ministries said in a joint statement that the cities of Casablanca, Settat, Berchid, Marrakech, Fez, Meknes, Tetouan and Tangier will be shut down with only people with special authorizations allowed in or out.
The permits cover health emergencies or people who seek to join their workplace, the statement adds.
The decision caused long ques on the highways and exists of the cities in question with Moroccan social media showing many traffic jams and accidents.
A new surge in cases over the last few days in Morocco was blamed on the lack of respect for precautionary measures by many citizens such as social distancing, use of masks and sanitizers.
Moroccan officials have repeatedly urged citizens to avoid unnecessary travel during the period of Eid and to remain vigilant in order to avoid a surge in infections.
The Health Ministry’s figures show that cases spiked by 811 and 633 in a single day Saturday and Sunday, rising total cases to 20278 including 313 deaths.
Morocco has stepped up tests, which rose on Sunday to 1.14 million.
Active coronavirus cases rose to 3,527 (10 per 100,000 inhabitants) most of whom are in Tangier region with 1366, Casablanca with 929, Fez-Meknes with 257, Rabat-Kenitra 71, the Oriental region 71, Dakhla-Oued Eddahab 44, Draa Tafilalet 33, Beni Mellal-Khenifra 18, Laayoune-Sakia El Hamra 15, Guelmim-Oued Noun 13 and Souss Massa 10.
Health Minister Khaled Ait Taleb warned earlier that lockdowns can be re-imposed to contain outbreaks in light of laxity shown by some citizens to apply protective measures.
Finance Minister Mohammed Benchaaboun however dismissed the possibility of a lockdown covering the whole nation citing economic losses as the country braces for a GDP contraction of 5% this fiscal year and a deficit of 7.5%.