Rule of law is a Sustainable Development Goal (SDG) seeking to promote peaceful and inclusive societies for sustainable development, provide access to justice for all and build effective, accountable and inclusive institutions at all levels (SDG 16). It enjoys wide global support, and within the United Nations system the rule of law is considered paramount for achieving other sustainable development goals, such as the rights to water, food, and energy. While there is much merit to this view, this chapter argues that the rule of law may at times be the single biggest obstacle for achieving the other SDGs. The chapter starts by highlighting the main rule of law theories from which SDG 16 draws, namely formal, procedural and substantive. All three theories require different kinds of certainty that is at odds with the uncertainty of the socio-ecological 'real' world. This uncertainty is caused mainly by the lack of scientific data and understanding of biological systems, economic and social risks, and the dynamic and complex nature of socio-ecological systems. If science cannot be certain of how the socio-ecological world operates or will operate, neither can the (rule of) law that seeks to regulate the human-environment interface. The chapter concludes by discussing two categories of legal mechanisms that may be used to reconcile the (rule of law's) need for certainty, and the uncertainty of the socio-ecological world. In the first line of inquiry it suggests that environmental regulations should be designed to alleviate scientific uncertainty by being adaptive. In the second line of inquiry it suggests courts are required to exercise their discretion in evaluating evidence and interpreting the law. These two mechanisms to tackle scientific uncertainty require major concessions from the rule of law but they need not be its demise. The rule of law trickles down to questions like how well and openly the decisions are reasoned.