Increasing migration, leading to more heterogeneous societies, may challenge the successful management of common-pool resources (CPRs) directly due to the lack of shared interests, and indirectly by reducing trust amongst local commons users, speeding up depletion of vital natural and man-made resources. Since little research has been done on this topic, we analyse the relation between economic and sociocultural heterogeneity, trust and successful commons management for fisheries and irrigation systems. Using multiple imputations with chained equations, random forests and predictive mean matching, we adopt an innovative and technically advanced approach to employ Elinor Ostrom’s famous CPR Database. Our approach enables us to include economic and sociocultural heterogeneity, trust and control variables in one model and to investigate both direct and indirect effects of heterogeneity on CPR success, which has not been attempted before. Results show no evidence of the negative relation between heterogeneity and CPR success. However, economic heterogeneity is negatively related to trust, and trust is found to be positively related to CPR success. Evidence is found for an indirect effect of economic heterogeneity through trust on CPR success.