Social media played an important role during the campaigns leading up to the Moroccan elections in September 2021. Digital campaigning contributed to the victory of the new ruling party. In the future, a more effective legal framework is needed to guarantee the transparency and fair funding of digital electoral campaigns.