AbstractThis study explores the impact of oil shocks on the Moroccan economy using a dynamic stochastic general equilibrium (DSGE) model. The DSGE simulations reveal that these shocks, exacerbated by the war in Ukraine, led to a contraction in the output gap, consumption, investment, and savings, as well as increased inflation. These results highlight the vulnerability of the Moroccan economy to external shocks, particularly those linked to energy prices. They underline the need for Morocco to diversify its energy sources and reduce its dependence on oil imports. Furthermore, our results suggest that economic policies should focus on mitigating the effects of these shocks. Future research could seek to refine this model by incorporating other factors likely to influence the Moroccan economy, such as changes in global demand or specific government policies.