Mangrove forests store high amounts of carbon, protect communities from storms, and support fisheries. Mangroves exist in complex social-ecological systems, hence identifying socioeconomic conditions associated with decreasing losses and increasing gains remains challenging albeit important. The impact of national governance and conservation policies on mangrove conservation at the landscape-scale has not been assessed to date, nor have the interactions with local economic pressures and biophysical drivers. Here, we assess the relationship between socioeconomic and biophysical variables and mangrove change across coastal geomorphic units worldwide from 1996 to 2016. Globally, we find that drivers of loss can also be drivers of gain, and that drivers have changed over 20 years. The association with economic growth appears to have reversed, shifting from negatively impacting mangroves in the first decade to enabling mangrove expansion in the second decade. Importantly, we find that community forestry is promoting mangrove expansion, whereas conversion to agriculture and aquaculture, often occurring in protected areas, results in high loss. Sustainable development, community forestry, and co-management of protected areas are promising strategies to reverse mangrove losses, increasing the capacity of mangroves to support human-livelihoods and combat climate change.