question: In the present paper we are interested in the epidemiological evolution of Covid19 in Morocco and we try to simulate the possible trajectories of the contagion. The objective of this research is to model the economic consequences of the epidemic and also to highlight the importance of the containment policy in facilitating economic recovery in Morocco. The results obtained using a combination of Ramsey's model and the epidemiological propagation model affirm that the choice of the containment policy made it possible to reduce the negative repercussions of the pandemic on Morocco, despite the economic consequences of the latter. The comparisons made between the two situations confirm that the economic repercussions remain moderate and Morocco will be able to face this disaster with even stricter or even more intelligent containment.