More than 15% of global terrestrial area is under some form of protection and there is a growing impetus to increase this coverage to 30% by 2030. But not all protection is effective and the reasons some countries’ protected areas (PAs) are more effective than others’ are poorly understood. We evaluate the effectiveness of national PA networks established between 2000 and 2012 globally in avoiding forest loss, taking into account underlying deforestation threats using a combination of matching methods and cross-sectional regressions. We then assess which demographic, agricultural, economic, and governance factors are most strongly associated with national PA effectiveness using machine learning methods. We estimate that national PAs established between 2000 and 2012 reduced deforestation in those areas by 72%, avoiding 86 062 km2 of forest loss. The effectiveness of national PAs varied by strictness of protection based on International Union for Conservation of Nature category. Strictly PAs reduced forest loss by 81% compared to what would have occurred without protection, while less strictly PAs reduced forest loss by 67%. Thus, the 26% of new PAs that were strictly protected contributed 39% of the total forest loss avoided within PAs between 2000 and 2012. If every country’s PAs were as effective as the country with the most effective PAs within the same region, they would have increased the area of deforestation avoided by 38%, saving a further 119 082 km2 of forest. Part of the variation in PA effectiveness across countries is explained by the placement of PA in areas facing higher deforestation threat. Countries with lower agricultural activity, higher economic growth and better governance are most strongly associated with greater country-level PA effectiveness.