Although formal institutions, particularly legal instruments which protect coastal ecosystems exist in many coastal countries, their contribution to enhancing the social-ecological resilience of mangroves has been limitedly explored. This study investigated how the synergies between legal instruments and local deities existing in coastal countries can contribute to enhancing the resilience of mangroves, using Benin Republic (West Africa) as a case study. The study employed seven principles of resilience derived from the literature to assess the existence, application, and respect of the legal framework that enhances the resilience of mangroves in Benin. Various data were collected through documents review (18 laws comprising 2727 articles), in-depth interviews (n = 18), focus groups discussions (n = 9) and drone-based field observations. Out of the 2727 articles reviewed, 93 articles summarized into 20 provisions were found to potentially enhance the resilience of mangroves, as they aligned with the considered principles of resilience. Although decrees, orders and law enforcement agencies exist to ensure the application of these provisions, challenges related to inadequate sensitization, insufficient resources, weak collaboration among institutions and land-related issues compromise their enforcement locally. Interestingly, the introduction of local deities in coastal areas, particularly for mangrove conservation facilitates the respect of some key provisions, notably the ban on mangrove wood cutting. This study identifies legal instruments as one of the important tools that can be used to enhance the social-ecological resilience of mangroves and calls for the incorporation of traditional beliefs in their effective enforcement to foster compliance and promote the sustainability of the ecosystem.